Hook XRInputSourceArray into XRSession

This commit is contained in:
Manish Goregaokar 2019-10-08 15:34:04 -07:00
parent 868e5cbd62
commit 8ae1c2e0ad
3 changed files with 33 additions and 37 deletions

View file

@ -16,31 +16,26 @@ callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame)
interface XRSession : EventTarget {
// // Attributes
readonly attribute XRSessionMode mode;
// readonly attribute XRPresentationContext outputContext;
readonly attribute XREnvironmentBlendMode environmentBlendMode;
readonly attribute XRRenderState renderState;
// readonly attribute XRVisibilityState visibilityState;
[SameObject] readonly attribute XRRenderState renderState;
[SameObject] readonly attribute XRInputSourceArray inputSources;
// // Methods
[Throws] void updateRenderState(optional XRRenderStateInit state = {});
Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
// workaround until we have FrozenArray
// see https://github.com/servo/servo/issues/10427#issuecomment-449593626
// FrozenArray<XRInputSource> getInputSources();
sequence<XRInputSource> getInputSources();
[Throws] void updateRenderState(optional XRRenderStateInit state = {});
long requestAnimationFrame(XRFrameRequestCallback callback);
void cancelAnimationFrame(long handle);
Promise<void> end();
// // Events
// attribute EventHandler onblur;
// attribute EventHandler onfocus;
attribute EventHandler onend;
attribute EventHandler onselect;
// attribute EventHandler oninputsourceschange;
attribute EventHandler onselectstart;
attribute EventHandler onselectend;
// attribute EventHandler onvisibilitychange;
};