From c7589158d25ed16c8769b7017f8e080608664811 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 22 Aug 2022 03:22:03 -0400 Subject: [PATCH] *Change crypto loader to use DOMContentLoaded to ensure document.head exists --- src/main/cryptoLoader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/cryptoLoader.ts b/src/main/cryptoLoader.ts index fd7f5f6..4e726a1 100644 --- a/src/main/cryptoLoader.ts +++ b/src/main/cryptoLoader.ts @@ -1,4 +1,4 @@ -(async function () { +document.addEventListener("DOMContentLoaded", async function () { if (!window.crypto.subtle) { let el = document.createElement("script"); // @ts-ignore @@ -10,4 +10,4 @@ }; document.head.appendChild(el); } -})(); +});