dom-overlays icon indicating copy to clipboard operation
dom-overlays copied to clipboard

XRDOMOverlayState should be an interface

Open foolip opened this issue 4 years ago • 0 comments

Per the spec, XRDOMOverlayState should be a dictionary, but in Chromium it's an interface.

Because XRDOMOverlayState is the type of an attribute on an interface, it doesn't really work to use a dictionary, since dictionaries are passed by value, and one would end up returning a new object each time, such that xrSession.domOverlay == xrSession.domOverlay would not hold.

Web IDL says simply:

Dictionaries must not be used as the type of an attribute or constant.

This doesn't make much of a difference, but will mean that there will be an window.XRDOMOverlayState interface object. (There is in Chromium, but shouldn't be per spec, which is how I noticed.)

foolip avatar Jan 29 '21 15:01 foolip