WebXR DOM Overlays Module: Difference between revisions

From WebXR Wiki
Jump to navigation Jump to search
(Create empty page with category)
 
(Add short summary and WebIDL)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Standards]]
{{Infobox specification
|title = WebXR DOM Overlays Module
|status = WD
|last_updated = 31 August 2021
|editors = [[Klaus Weidner]]
|group = WG
}}
 
The WebXR DOM Overlays module expands the [[WebXR Device API]] with a mechanism for showing interactive 2D web content during an immersive WebXR session. When the feature is enabled, the user agent will display the content of a single DOM element as a transparent-background 2D rectangle.
 
==WebIDL==
<syntaxhighlight lang="idl">
partial interface mixin GlobalEventHandlers {
  attribute EventHandler onbeforexrselect;
};
 
partial dictionary XRSessionInit {
  XRDOMOverlayInit? domOverlay;
};
 
partial interface XRSession {
  readonly attribute XRDOMOverlayState? domOverlayState;
};
 
dictionary XRDOMOverlayInit {
  required Element root;
};
 
enum XRDOMOverlayType {
  "screen",
  "floating",
  "head-locked"
};
 
dictionary XRDOMOverlayState {
  XRDOMOverlayType type;
};
</syntaxhighlight>
 
== External Links ==
* [https://www.w3.org/TR/webxr-dom-overlays-1/ Specification]
* [https://github.com/immersive-web/dom-overlays GitHub]
 
{{Navbox specifications}}
 
[[Category:Specifications]]

Latest revision as of 00:28, 1 March 2023

WebXR DOM Overlays Module
StatusWD
Last Updated31 August 2021
Editor(s)Klaus Weidner
CG or WG?WG

The WebXR DOM Overlays module expands the WebXR Device API with a mechanism for showing interactive 2D web content during an immersive WebXR session. When the feature is enabled, the user agent will display the content of a single DOM element as a transparent-background 2D rectangle.

WebIDL[edit]

partial interface mixin GlobalEventHandlers {
  attribute EventHandler onbeforexrselect;
};

partial dictionary XRSessionInit {
  XRDOMOverlayInit? domOverlay;
};

partial interface XRSession {
  readonly attribute XRDOMOverlayState? domOverlayState;
};

dictionary XRDOMOverlayInit {
  required Element root;
};

enum XRDOMOverlayType {
  "screen",
  "floating",
  "head-locked"
};

dictionary XRDOMOverlayState {
  XRDOMOverlayType type; 
};

External Links[edit]