spite / WebVR-Extension

Chrome DevTools extension to emulate WebVR API
MIT License
304 stars 43 forks source link

Workaround for Origin Trials #21

Open spite opened 7 years ago

spite commented 7 years ago

webvr.info recently implemented Origin Trials, so the WebVR API is available for the page.

One side-effect of that is that, since the API is "loaded" when the page loads and the OriginTrials token is processed, it overwrites with native methods what the emulator has injected from the content-script, creating a mess of native and injected methods.

spite commented 7 years ago

I have a feeling this can be solved with https://github.com/spite/WebVR-Extension/issues/10

Rewriting as a wrapper that can work with the existing implementation plus one (or more) emulated devices, should work.

Also it means that it has to implement the wrapping lazily, to support this new possibility open by using OriginTrials.