replace getElementsByTagName to querySelectorAll
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
export const isIframe = window.self !== window.top;
|
export const isIframe = window.self !== window.top;
|
||||||
|
|
||||||
export const sendIframeMsg = (action, args) => {
|
export const sendIframeMsg = (action, args) => {
|
||||||
document.getElementsByTagName("iframe").forEach((iframe) => {
|
document.querySelectorAll("iframe").forEach((iframe) => {
|
||||||
iframe.contentWindow.postMessage({ action, args }, "*");
|
iframe.contentWindow.postMessage({ action, args }, "*");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user