From af050c52d3b6ddddc6e832ec037a306c9086a1f4 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Sun, 7 Apr 2024 23:01:59 -0500 Subject: [PATCH] get rid of the boundIFrameLoad nightmare, makes Alu look MUCH more responsive. --- src/components/ProxyRegistrar.astro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index f157a84..d33c95f 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -115,8 +115,9 @@ iframe.style.pointerEvents = "auto"; iframe.classList.add("proxy-frame"); document.body.appendChild(iframe); - const boundIFrameLoad = iframeLoad.bind(null, iframe, loadingContent, topbar, closeButton); - iframe.addEventListener("load", boundIFrameLoad); + setTimeout(() => { + iframeLoad(iframe, loadingContent, topbar, closeButton); + }, 500); function iframeLoad( iframe: HTMLIFrameElement, @@ -135,7 +136,6 @@ iframe.style.pointerEvents = "none"; topbar.style.pointerEvents = "none"; document.body.style.overflow = "auto"; - iframe.removeEventListener("load", boundIFrameLoad); setTimeout(() => { iframe.src = "about:blank";