-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
script: Implement DocumentOrShadowRoot.FullscreenDocument #42234
Description
Currently the FullscreenElement is implemented only within the Document as follow.
servo/components/script_bindings/webidls/Document.webidl
Lines 201 to 204 in f1440d3
| partial interface Document { | |
| [LegacyLenientSetter] readonly attribute boolean fullscreenEnabled; | |
| [LegacyLenientSetter] readonly attribute Element? fullscreenElement; | |
| [LegacyLenientSetter] readonly attribute boolean fullscreen; // historical |
servo/components/script/dom/document.rs
Lines 6437 to 6441 in f1440d3
| /// <https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement> | |
| fn GetFullscreenElement(&self) -> Option<DomRoot<Element>> { | |
| // TODO ShadowRoot | |
| self.fullscreen_element.get() | |
| } |
But it should be implemented in DocumentOrShadowRoot mixin by following the spec (https://fullscreen.spec.whatwg.org/#ref-for-dom-document-fullscreenelement) and putting it in the DocumentOrShadowRoot webidl.
servo/components/script_bindings/webidls/DocumentOrShadowRoot.webidl
Lines 10 to 17 in f1440d3
| interface mixin DocumentOrShadowRoot { | |
| // Selection? getSelection(); | |
| Element? elementFromPoint (double x, double y); | |
| sequence<Element> elementsFromPoint (double x, double y); | |
| // CaretPosition? caretPositionFromPoint (double x, double y); | |
| readonly attribute Element? activeElement; | |
| readonly attribute StyleSheetList styleSheets; | |
| }; |
And, followed by the implementation of getter steps (https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement).