mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #24397 - Manishearth:inputarray, r=jdm
Support new way of doing input source arrays Fixes https://github.com/servo/servo/issues/24395 r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24397) <!-- Reviewable:end -->
This commit is contained in:
commit
ec408e9a57
6 changed files with 110 additions and 61 deletions
12
components/script/dom/webidls/XRInputSourceArray.webidl
Normal file
12
components/script/dom/webidls/XRInputSourceArray.webidl
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://immersive-web.github.io/webxr/#xrinputsourcearray-interface
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
interface XRInputSourceArray {
|
||||
iterable<XRInputSource>;
|
||||
readonly attribute unsigned long length;
|
||||
getter XRInputSource(unsigned long index);
|
||||
};
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue