WebXR DOM Overlays Module: Difference between revisions

From WebXR Wiki
Jump to navigation Jump to search
(Add boilerplate information)
(Add short summary and WebIDL)
 
Line 6: Line 6:
  |group = WG
  |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 ==
== External Links ==

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]