aboutsummaryrefslogtreecommitdiff
path: root/ext/js/script/dynamic-loader.js
diff options
context:
space:
mode:
authorjbukl <noreply@github.com>2023-11-10 19:15:42 -0500
committerjbukl <noreply@github.com>2023-11-10 21:37:01 -0500
commitbc695c21e234a1a531abe201ee3a2881f3e39d7f (patch)
tree3257920a72ed71f0b46c5928678c1629c643a169 /ext/js/script/dynamic-loader.js
parent382f2ec40ac6861adc90da253df0537d47c3e7cf (diff)
Fix dynamic loader esm
Fix dynamic loader script check
Diffstat (limited to 'ext/js/script/dynamic-loader.js')
-rw-r--r--ext/js/script/dynamic-loader.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/script/dynamic-loader.js b/ext/js/script/dynamic-loader.js
index 2eced077..ffce04c1 100644
--- a/ext/js/script/dynamic-loader.js
+++ b/ext/js/script/dynamic-loader.js
@@ -126,6 +126,7 @@ export const dynamicLoader = (() => {
if (node !== null) { continue; }
const script = document.createElement('script');
+ script.type = 'module';
script.async = false;
script.src = url;
parent.appendChild(script);
@@ -140,7 +141,7 @@ export const dynamicLoader = (() => {
const sentinelEventName = 'dynamicLoaderSentinel';
const sentinelEventCallback = (e) => {
- if (e.script !== script) { return; }
+ if (e.script !== script.src) { return; }
yomichan.off(sentinelEventName, sentinelEventCallback);
parent.removeChild(script);
resolve();