Open msub2 opened 1 year ago
Per discussion on Discord, it appears the blocker in Firefox is support for background service workers for Manifest V3 https://bugzilla.mozilla.org/show_bug.cgi?id=1573659
Besides the lack of background service worker support in Firefox, there is another issue. The MAIN
ExecutionWorld isn't supported by Firefox yet, which the extension uses to inject the webxr-polyfill. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1736575
It's relatively straightforward to get something working as the background service worker can be swapped out for a background event page/script (I believe that is Firefox only when used with Manifest v3) and injecting the webxr-polyfill.js
into the document from a content script instead of as as content script.
I created a fork with the above two changes and it seems to work surprisingly well. :slightly_smiling_face:
There is only one minor inconvenience. The execution of the polyfill script isn't guaranteed to be before the other scripts on a page, so a page might conclude that WebXR isn't supported. Setting dom.vr.webxr.enabled
to true in about:config
effectively works around this issue as the page either detects the "real" WebXR API or the polyfill, but once you enter an immersive session it uses the polyfill
Link to the fork: https://github.com/mrxz/immersive-web-emulator
any idea when this will happen?
I've been a long time user of Firefox, and for a while I was able to load this extension as a temporary add-on (I assume this was before aligning it with Manifest V3). As someone with no experience in WebExtensions development, what exactly is the primary issue preventing this from working on Firefox now? From a quick skim of resources Mozilla seems to declare that they're supporting V3, but maybe you can shed some more light on the subject.