Hi, I am trying to put a bundled JS library into a plugin. The library uses some HTMLElement
s and TiddlyWiki complains about it is not defined. I use the latest stable version of TW.
The error message is like below:
Error executing boot module $:/plugins/LittleYe233/TW5-MaterialDesign3/bundle.min.js: ReferenceError: HTMLElement is not defined
ReferenceError: HTMLElement is not defined
at $:/plugins/LittleYe233/TW5-MaterialDesign3/bundle.min.js:17:701
at $:/plugins/LittleYe233/TW5-MaterialDesign3/bundle.min.js:1916:259
at $:/plugins/LittleYe233/TW5-MaterialDesign3/bundle.min.js:1918:4
at $tw.utils.evalGlobal ($:/boot/boot.js:642:12)
at $tw.utils.evalSandboxed ($:/boot/boot.js:649:19)
at $tw.modules.execute ($:/boot/boot.js:931:15)
at require ($:/boot/boot.js:878:24)
at $:/plugins/LittleYe233/TW5-MaterialDesign3/widgets/checkbox.js:4:14
at $:/plugins/LittleYe233/TW5-MaterialDesign3/widgets/checkbox.js:34:3
at $:/plugins/LittleYe233/TW5-MaterialDesign3/widgets/checkbox.js:35:4
I am a bit confused because HTMLElement
exists in the Web APIs (at least it has a page at MDN web docs) and it should be defined in web browsers. So how does it happen and is there any way to fix it?