Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to turn WebXR shim off without uninstalling the extension #14

Closed
hybridherbst opened this issue Mar 7, 2023 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@hybridherbst
Copy link

hybridherbst commented Mar 7, 2023

Maybe I'm missing something, but seems that currently when the extension is installed it always polyfills - since we also want to test codepaths where XR is not available that's not very helpful, so I had to remove the extension again.

Could maybe be as simple as having "None" in the device dropdown?

This also extends to a note written in the docs:

Even if native WebXR API is available the extension overrides it with WebXR polyfill

which is also not really ideal... I find the extension useful but constantly uninstalling / installing it while testing something is a bit.

@hybridherbst hybridherbst changed the title Ability to turn webxr support off without uninstalling the extension Ability to turn WebXR support off without uninstalling the extension Mar 7, 2023
@hybridherbst hybridherbst changed the title Ability to turn WebXR support off without uninstalling the extension Ability to turn WebXR shim off without uninstalling the extension Mar 7, 2023
@felixtrz
Copy link
Contributor

I think it's a good idea, though I think it's not as straight forward to implement as it sounds.. A content script is automatically injected before the page loads, adding WebXR polyfill, and the page requires the script to communicate with the emulator UI. I will add this to my to-do list and will take a look as soon as I get some extra time.

@felixtrz
Copy link
Contributor

What we do when we need to test codepaths where XR is not available is to open the WebXR app in incognito mode, extensions are turned off for incognito mode by default (can be changed by settings), and XR will not be available as a result.

@felixtrz felixtrz self-assigned this Mar 11, 2023
@felixtrz felixtrz added the enhancement New feature or request label Mar 11, 2023
@hybridherbst
Copy link
Author

hybridherbst commented Mar 11, 2023

Thanks for the feedback. I understand the point about before-page-load injection. I think it would be totally fine if the page would reload when the "on/off" button is toggled (or if this change would only take effect on reload).

The incognito workaround is a bit problematic since it also turns off other extensions, auth information, etc., which are also good to have for development.

@felixtrz
Copy link
Contributor

felixtrz commented May 8, 2023

@hybridherbst Working on this now, this feature will be shipped in v1.3 (end of May release), but will be available sooner if you install from source as soon as I check it in (guessing by next week)

@felixtrz
Copy link
Contributor

This feature was shipped in v1.3.0, closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants