mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
WebVR 1.1 spec compatibility
This commit is contained in:
parent
296a215e54
commit
fe4ee6de2e
16 changed files with 112 additions and 55 deletions
|
@ -114,6 +114,17 @@ interface WindowEventHandlers {
|
|||
attribute EventHandler onunload;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webvr/spec/1.1/#interface-window
|
||||
partial interface WindowEventHandlers {
|
||||
attribute EventHandler onvrdisplayconnect;
|
||||
attribute EventHandler onvrdisplaydisconnect;
|
||||
attribute EventHandler onvrdisplayactivate;
|
||||
attribute EventHandler onvrdisplaydeactivate;
|
||||
attribute EventHandler onvrdisplayblur;
|
||||
attribute EventHandler onvrdisplayfocus;
|
||||
attribute EventHandler onvrdisplaypresentchange;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
||||
[NoInterfaceObject, Exposed=Window]
|
||||
interface DocumentAndElementEventHandlers {
|
||||
|
|
|
@ -58,9 +58,9 @@ interface NavigatorCookies {
|
|||
readonly attribute boolean cookieEnabled;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-navigator
|
||||
// https://w3c.github.io/webvr/spec/1.1/#interface-navigator
|
||||
partial interface Navigator {
|
||||
[SameObject, Pref="dom.webvr.enabled"] readonly attribute VR vr;
|
||||
[Pref="dom.webvr.enabled"] Promise<sequence<VRDisplay>> getVRDisplays();
|
||||
};
|
||||
|
||||
// https://w3c.github.io/permissions/#navigator-and-workernavigator-extension
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://w3c.github.io/webvr/#interface-navigator
|
||||
[Pref="dom.webvr.enabled"]
|
||||
interface VR: EventTarget {
|
||||
[NoInterfaceObject]
|
||||
interface VR {
|
||||
Promise<sequence<VRDisplay>> getDisplays();
|
||||
//readonly attribute FrozenArray<VRDisplay> activeVRDisplays;
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ interface VRDisplay : EventTarget {
|
|||
/**
|
||||
* Get the layers currently being presented.
|
||||
*/
|
||||
//sequence<VRLayer> getLayers();
|
||||
sequence<VRLayer> getLayers();
|
||||
|
||||
/**
|
||||
* The VRLayer provided to the VRDisplay will be captured and presented
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue