Skip to content

Commit af360a3

Browse files
committed
try to ensure iframe is hidden DuendeArchive#430
1 parent 92c8236 commit af360a3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/CheckSessionIFrame.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ export default class CheckSessionIFrame {
1616
this._frame_origin = url.substr(0, idx);
1717

1818
this._frame = window.document.createElement("iframe");
19-
//this._frame.style.display = "none";
19+
20+
// shotgun approach
2021
this._frame.style.visibility = "hidden";
2122
this._frame.style.position = "absolute";
22-
this._frame.src = url;
23+
this._frame.style.display = "none";
24+
this._frame.style.width = 0;
25+
this._frame.style.height = 0;
2326

27+
this._frame.src = url;
2428
}
2529
load() {
2630
return new Promise((resolve) => {

src/IFrameWindow.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ export default class IFrameWindow {
1919
window.addEventListener("message", this._boundMessageEvent, false);
2020

2121
this._frame = window.document.createElement("iframe");
22-
//this._frame.style.display = "none";
22+
23+
// shotgun approach
2324
this._frame.style.visibility = "hidden";
2425
this._frame.style.position = "absolute";
26+
this._frame.style.display = "none";
27+
this._frame.style.width = 0;
28+
this._frame.style.height = 0;
29+
2530
window.document.body.appendChild(this._frame);
2631
}
2732

0 commit comments

Comments
 (0)