Skip to content

script: Implement DocumentOrShadowRoot.FullscreenDocument #42234

@stevennovaryo

Description

@stevennovaryo

Currently the FullscreenElement is implemented only within the Document as follow.

partial interface Document {
[LegacyLenientSetter] readonly attribute boolean fullscreenEnabled;
[LegacyLenientSetter] readonly attribute Element? fullscreenElement;
[LegacyLenientSetter] readonly attribute boolean fullscreen; // historical

/// <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.

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).

Metadata

Metadata

Assignees

Labels

A-content/scriptRelated to the script threadC-has-open-prThere is a PR open that resolves the issueE-less-complexStraightforward. Recommended for a new contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions