Skip to content

Commit

Permalink
Merge pull request #228 from hepengwei/feat_he
Browse files Browse the repository at this point in the history
调试
  • Loading branch information
hepengwei authored Dec 12, 2023
2 parents 6a54f52 + 8c8b124 commit 856b9dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/main.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/hooks/useQuantumEntanglement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const useQuantumEntanglement = (
y = window.innerHeight / 2 + window.screenTop;
}
const data = { pageId: pageId.current, x, y };
console.log(333);
(aIframe as HTMLIFrameElement).contentWindow?.postMessage(
JSON.stringify(data),
"*"
Expand Down Expand Up @@ -143,8 +144,10 @@ const useQuantumEntanglement = (
};

const resendMessage = useCallback(() => {
postInfo();
getLocalThatPageInfo();
if (window.self === window.top) {
postInfo();
getLocalThatPageInfo();
}
}, []);

useScreenPosition(resendMessage);
Expand Down

0 comments on commit 856b9dc

Please sign in to comment.