Suggestion: Expose requestAnimationFrameFunctions and spiedWindow in main script
De-Panther opened this issue · 3 comments
De-Panther commented
There are some cases where the window.rAF
is packed by other scopes to add functionalities to it. (e.g. some XR emulators or for cases of rendering frames selectively)
Following the WebXR PR #257
I think that similar to how the requestAnimationFrameFunctions
and spiedWindow
were exposed for xrSpy
, it would be nice to add an option to set them from the main Spector.js
script as well.
spector = new SPECTOR.Spector();
spector.addRequestAnimationFrameFunctionName("customRafName");
spector.setSpiedWindow(referenceToScope); // or spector.setSpiedScope
spector.displayUI();
sebavan commented
Do you want to make a PR for it ?
De-Panther commented
Do you want to make a PR for it ?
Sure.
Is renaming 'spiedWindow' to 'spiedScope' and adding 'setSpiedScope' is ok?