get rid of the boundIFrameLoad nightmare, makes Alu look MUCH more responsive.
This commit is contained in:
parent
2bd41a9552
commit
af050c52d3
1 changed files with 3 additions and 3 deletions
|
|
@ -115,8 +115,9 @@
|
||||||
iframe.style.pointerEvents = "auto";
|
iframe.style.pointerEvents = "auto";
|
||||||
iframe.classList.add("proxy-frame");
|
iframe.classList.add("proxy-frame");
|
||||||
document.body.appendChild(iframe);
|
document.body.appendChild(iframe);
|
||||||
const boundIFrameLoad = iframeLoad.bind(null, iframe, loadingContent, topbar, closeButton);
|
setTimeout(() => {
|
||||||
iframe.addEventListener("load", boundIFrameLoad);
|
iframeLoad(iframe, loadingContent, topbar, closeButton);
|
||||||
|
}, 500);
|
||||||
|
|
||||||
function iframeLoad(
|
function iframeLoad(
|
||||||
iframe: HTMLIFrameElement,
|
iframe: HTMLIFrameElement,
|
||||||
|
|
@ -135,7 +136,6 @@
|
||||||
iframe.style.pointerEvents = "none";
|
iframe.style.pointerEvents = "none";
|
||||||
topbar.style.pointerEvents = "none";
|
topbar.style.pointerEvents = "none";
|
||||||
document.body.style.overflow = "auto";
|
document.body.style.overflow = "auto";
|
||||||
iframe.removeEventListener("load", boundIFrameLoad);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
iframe.src = "about:blank";
|
iframe.src = "about:blank";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue