We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49363a8 commit d695a3dCopy full SHA for d695a3d
src/IFrameWindow.js
@@ -105,11 +105,12 @@ export class IFrameWindow {
105
106
static notifyParent(url) {
107
Log.debug("IFrameWindow.notifyParent");
108
-
109
- url = url || window.location.href;
110
- if (url) {
111
- Log.debug("IFrameWindow.notifyParent: posting url message to parent");
112
- window.parent.postMessage(url, location.protocol + "//" + location.host);
+ if (window.frameElement) {
+ url = url || window.location.href;
+ if (url) {
+ Log.debug("IFrameWindow.notifyParent: posting url message to parent");
+ window.parent.postMessage(url, location.protocol + "//" + location.host);
113
+ }
114
}
115
116
0 commit comments