mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #23814 - Manishearth:events, r=asajeffrey
Partial support for events in WebXR Needs https://github.com/servo/webxr/pull/20 r? @asajeffrey <!-- 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/23814) <!-- Reviewable:end -->
This commit is contained in:
commit
7afe2153e8
19 changed files with 299 additions and 108 deletions
|
@ -1,8 +0,0 @@
|
|||
/* 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/#xrlayer-interface
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
interface XRLayer {};
|
|
@ -7,11 +7,11 @@
|
|||
dictionary XRRenderStateInit {
|
||||
double depthNear;
|
||||
double depthFar;
|
||||
XRLayer baseLayer;
|
||||
XRWebGLLayer baseLayer;
|
||||
};
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] interface XRRenderState {
|
||||
readonly attribute double depthNear;
|
||||
readonly attribute double depthFar;
|
||||
readonly attribute XRLayer? baseLayer;
|
||||
readonly attribute XRWebGLLayer? baseLayer;
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ interface XRSession : EventTarget {
|
|||
// FrozenArray<XRInputSource> getInputSources();
|
||||
sequence<XRInputSource> getInputSources();
|
||||
|
||||
void updateRenderState(optional XRRenderStateInit state = {});
|
||||
[Throws] void updateRenderState(optional XRRenderStateInit state = {});
|
||||
long requestAnimationFrame(XRFrameRequestCallback callback);
|
||||
void cancelAnimationFrame(long handle);
|
||||
|
||||
|
@ -38,7 +38,7 @@ interface XRSession : EventTarget {
|
|||
// // Events
|
||||
// attribute EventHandler onblur;
|
||||
// attribute EventHandler onfocus;
|
||||
// attribute EventHandler onend;
|
||||
attribute EventHandler onend;
|
||||
// attribute EventHandler onselect;
|
||||
// attribute EventHandler oninputsourceschange;
|
||||
// attribute EventHandler onselectstart;
|
||||
|
|
15
components/script/dom/webidls/XRSessionEvent.webidl
Normal file
15
components/script/dom/webidls/XRSessionEvent.webidl
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* 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/#xrsessionevent-interface
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled", Constructor
|
||||
(DOMString type, XRSessionEventInit eventInitDict)]
|
||||
interface XRSessionEvent : Event {
|
||||
[SameObject] readonly attribute XRSession session;
|
||||
};
|
||||
|
||||
dictionary XRSessionEventInit : EventInit {
|
||||
required XRSession session;
|
||||
};
|
|
@ -21,7 +21,7 @@ dictionary XRWebGLLayerInit {
|
|||
XRWebGLRenderingContext context,
|
||||
optional XRWebGLLayerInit layerInit = {}),
|
||||
Pref="dom.webxr.enabled"]
|
||||
interface XRWebGLLayer : XRLayer {
|
||||
interface XRWebGLLayer {
|
||||
// // Attributes
|
||||
readonly attribute XRWebGLRenderingContext context;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue