While trying to mount a component using bits-ui I get the error TypeError: proto2 is null, the same doesn't happen when using a simpler component, neither while using Chrome. Looking at the debugger I found that this exception is triggered when Svelte tries to read the name of the constructor from an HTMLElement prototype here.
Making a smaller test I found out that Object.getPrototypeOf(document.createElement("div")).constructor.name is undefined for any content script in Firefox. This is probably related to the Xray vision isolation mechanism for extensions.
Describe the bug
While trying to mount a component using
bits-ui
I get the errorTypeError: proto2 is null
, the same doesn't happen when using a simpler component, neither while using Chrome. Looking at the debugger I found that this exception is triggered when Svelte tries to read the name of the constructor from an HTMLElement prototype here.Making a smaller test I found out that
Object.getPrototypeOf(document.createElement("div")).constructor.name
is undefined for any content script in Firefox. This is probably related to the Xray vision isolation mechanism for extensions.Reproduction
https://github.com/HectorxH/svelte-firefox-webext-bug
Installing the extension from
/dist
and opening github should replicate the issue.Logs
No response
System Info
Severity
blocking all usage of svelte