Skip to content

Commit a490d1f

Browse files
committed
only send string (not object) when using post message (for IE9)
1 parent c2ba727 commit a490d1f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/IFrameWindow.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class IFrameWindow {
7878
e.origin === this._origin &&
7979
e.source === this._frame.contentWindow
8080
) {
81-
let url = e.data.url;
81+
let url = e.data;
8282
if (url) {
8383
this._success({ url: url });
8484
}
@@ -99,7 +99,7 @@ export default class IFrameWindow {
9999
url = url || window.location.href;
100100
if (url) {
101101
Log.info("posting url message to parent");
102-
window.parent.postMessage({ url: url }, location.protocol + "//" + location.host);
102+
window.parent.postMessage(url, location.protocol + "//" + location.host);
103103
}
104104
}
105105
}

‎src/PopupWindow.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default class PopupWindow {
9292
) {
9393
Log.info("processing message");
9494

95-
let url = e.data.url;
95+
let url = e.data;
9696

9797
this._cleanup();
9898

@@ -116,7 +116,7 @@ export default class PopupWindow {
116116
url = url || window.location.href;
117117
if (url) {
118118
Log.info("posting url message to opener");
119-
window.opener.postMessage({ url: url }, location.protocol + "//" + location.host);
119+
window.opener.postMessage(url, location.protocol + "//" + location.host);
120120
}
121121
}
122122
}

0 commit comments

Comments
 (0)