diff --git a/fullscreen.bs b/fullscreen.bs index b43e520..966200f 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -110,8 +110,8 @@ and add it to its node document's top layer.
Whenever the removing steps run with an oldNode, run these steps:
Let nodes be oldNode's inclusive descendants that have their - fullscreen flag set, in tree order. +
Let nodes be oldNode's shadow-including inclusive descendants + that have their fullscreen flag set, in shadow-including tree order.
For each node in nodes, run these substeps: @@ -153,7 +153,6 @@ partial interface Element { partial interface Document { [LenientSetter] readonly attribute boolean fullscreenEnabled; - [LenientSetter] readonly attribute Element? fullscreenElement; [LenientSetter] readonly attribute boolean fullscreen; // historical Promise<void> exitFullscreen(); @@ -161,6 +160,10 @@ partial interface Document { attribute EventHandler onfullscreenchange; attribute EventHandler onfullscreenerror; }; + +partial interface DocumentOrShadowRoot { + [LenientSetter] readonly attribute Element? fullscreenElement; +};
Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise. -
document . {{Document/fullscreenElement}}
- Returns document's fullscreen element. -
promise = document . {{Document/exitFullscreen()}}
Stops document's fullscreen element from being displayed fullscreen and fulfills promise when done. + +
document . {{DocumentOrShadowRoot/fullscreenElement}}
+ Returns document's fullscreen element. + +
shadowroot . {{DocumentOrShadowRoot/fullscreenElement}}
+ Returns shadowroot's fullscreen element.
A fullscreen element ready check for an element element returns true @@ -184,7 +190,7 @@ if all of the following are true, and false otherwise:
element is in a document. +
element is connected.
element's node document is allowed to use the feature indicated by
attribute name allowfullscreen
.
@@ -283,14 +289,24 @@ these steps:
return true if the context object is allowed to use the feature indicated by attribute
name allowfullscreen
and fullscreen is supported, and false otherwise.
-
The fullscreenElement
attribute's getter must
-return context object's fullscreen element.
-
The fullscreen
attribute's getter must return
false if context object's fullscreen element is null, and true otherwise.
-
Use
-document.fullscreenElement
instead.
+
Use {{DocumentOrShadowRoot/fullscreenElement}} instead. + +
The
+fullscreenElement
+attribute's getter must run these steps:
+
+
If the context object is a shadow root and its host + is not connected, then return null.
Let candidate be the result of retargeting fullscreen element + against the context object. +
If candidate and the context object are in the same tree, + return candidate. +
Return null. +
To collect documents to unfullscreen given doc, run these steps: @@ -461,8 +477,8 @@ following characteristics: is the viewport, and the initial containing block otherwise.
If it is an element, it and its ::backdrop
pseudo-element are not
- rendered if its inclusive ancestor has the display
property set to
- none
.
+ rendered if its shadow-including inclusive ancestor has the display
property
+ set to none
.
If its specified display
property is contents
, it computes to
block
.
@@ -503,11 +519,12 @@ properties apply to this pseudo-element either.
:fullscreen
pseudo-classThe :fullscreen
pseudo-class must match any
-element that has its fullscreen flag set.
-
-
This makes it different from the {{Document/fullscreenElement}} API, -which returns a document's fullscreen element. +element that has its fullscreen flag set, and the non-null results of +retargeting fullscreen element against each connected root of +node trees. +
This makes it different from the fullscreenElement API, which returns +returns the topmost fullscreen element.
Let nodes be oldNode’s inclusive descendants that have their fullscreen flag set, in tree order.
+Let nodes be oldNode’s shadow-including inclusive descendants that have their fullscreen flag set, in shadow-including tree order.
For each node in nodes, run these substeps:
promise = element . requestFullscreen()
@@ -197,19 +200,22 @@ Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.
-document . fullscreenElement
- Returns document’s fullscreen element.
promise = document . exitFullscreen()
Stops document’s fullscreen element from being displayed fullscreen and fulfills promise when done.
+document . fullscreenElement
+ Returns document’s fullscreen element.
+shadowroot . fullscreenElement
+ Returns shadowroot’s fullscreen element.
A fullscreen element ready check for an element element returns true if all of the following are true, and false otherwise:
element is in a document.
+element is connected.
element’s node document is allowed to use the feature indicated by
attribute name allowfullscreen
.
fullscreenEnabled
attribute’s getter must
return true if the context object is allowed to use the feature indicated by attribute
name allowfullscreen
and fullscreen is supported, and false otherwise.
- The fullscreenElement
attribute’s getter must
-return context object’s fullscreen element.
The fullscreen
attribute’s getter must return
false if context object’s fullscreen element is null, and true otherwise.
Use document.fullscreenElement
instead.
Use fullscreenElement
instead.
The fullscreenElement
attribute’s getter must run these steps:
If the context object is a shadow root and its host is not connected, then return null.
+Let candidate be the result of retargeting fullscreen element against the context object.
+If candidate and the context object are in the same tree, + return candidate.
+Return null.
+To collect documents to unfullscreen given doc, run these steps:
If it is an element, it and its ::backdrop
pseudo-element are not
- rendered if its inclusive ancestor has the display
property set to none
.
display
property
+ set to none
.
If its specified display
property is contents
, it computes to block
.
:fullscreen
pseudo-classThe :fullscreen
pseudo-class must match any element that has its fullscreen flag set.
This makes it different from the fullscreenElement
API,
-which returns a document’s fullscreen element.
The :fullscreen
pseudo-class must match any element that has its fullscreen flag set, and the non-null results of retargeting fullscreen element against each connected root of node trees.
This makes it different from the fullscreenElement API, which returns +returns the topmost fullscreen element.
@namespace "http://www.w3.org/1999/xhtml";