WebXR DOM Overlays Module

From WebXR Wiki
Revision as of 00:28, 1 March 2023 by Msub2 (talk | contribs) (Add short summary and WebIDL)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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]