diff --git a/source b/source index 73646634775..b710c0c3c04 100644 --- a/source +++ b/source @@ -2880,6 +2880,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
DataCloneError
"EncodingError
"NotAllowedError
"InvalidNodeTypeError
"When this specification requires a user agent to create a Date
object
@@ -3271,6 +3272,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Text
node conceptThe following features are defined in UI Events: UIEVENTS
@@ -12941,6 +12943,8 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%autocapitalize
autofocus
contenteditable
cue
cuebackground
dir
draggable
enterkeyhint
An arbitrary string.
+A DocumentFragment
that is the content of the cue.
A map representing the pseudo-element associated with the cue.
+The time, in seconds and fractions of a second, that describes the beginning of the range of @@ -40124,6 +40138,7 @@ interface TextTrackCueList {
[Exposed=Window]
interface TextTrackCue : EventTarget {
+ constructor(double startTime, double endTime, DocumentFragment cueFragment);
readonly attribute TextTrack? track;
attribute DOMString id;
@@ -40136,6 +40151,10 @@ interface TextTrackCue : EventTarget {
};
cue = new TextTrackCue(startTime, endTime, cueFragment)
Creates a TextTrackCue
instance with the given parameters.
cue.track
Returns the TextTrack
object to which this text track cue belongs,
@@ -40175,6 +40194,110 @@ interface TextTrackCue : EventTarget {
The TextTrackCue(startTime, endTime,
+ cueFragment)
constructor runs the following steps:
If cueFragment first child is null, then throw an
+ "InvalidNodeTypeError
" DOMException
.
For each child in cueFragment's children:
+Ensure child is an allowed cue descendant.
Let fragment be a newly created DocumentFragment
using
+ this's relevant global object's associated Document
.
Let clones be a clone of cueFragment, with the clone children flag + set to true.
This is to prevent mutation of the cueFragment + after construction.
+Append clones into fragment.
"Append" ensures pre-insertion + validity, which can throw.
+Initialize this's text track cue pseudo-elements to a new map + «[ "::cue" → null, "::cue-background" → null ]».
Assign the required pseudo-elements for + cue passing this and fragment.
Set this's text track cue fragment to + fragment.
Set this's text track cue start time to + startTime.
Set this's text track cue end time to + endTime.
Return this.
To ensure Node
node is an
+ allowed cue descendant, run these steps:
If node is not an exclusive Text
node or is not an
+ Element
, then throw "InvalidNodeTypeError
"
+ DOMException
.
If node is an Element
:
If node's namespace is not in the HTML namespace, then throw
+ "InvalidNodeTypeError
" DOMException
.
If node's local name is not one of the following: "b", "br", "i", "div",
+ "p", "rb", "rt", "rtc", "ruby", "span", then throw
+ "InvalidNodeTypeError
" DOMException
.
For each child of node in tree order: +
Ensure child is an allowed cue descendant.
To assign required pseudo-elements for
+ cue to a TextTrack
track with a Node
node
+ and an optional boolean isRoot (default true):
If node is an Element
:
Let pseudos be track's text track cue + pseudo-elements.
If pseudos["::cue-background"] is null:
+Set pseudos["::cue-background"] to the result of getting an attribute in + the HTML namespace, "cuebackground", node.
If pseudos["::cue"] is null:
+Let cue be the result of getting an attribute in the HTML + namespace, "cue", node.
If cue is not null:
+Let backgroundCue be pseudos["::cue-background"].
If backgroundCue is null, then throw a
+ "HierarchyRequestError
" DOMException
.
If backgroundCue is not an inclusive ancestor of cue, then
+ throw a "HierarchyRequestError
"
+ DOMException
.
Set pseudos["::cue"] to cue.
Return.
For each child of node in tree order:
+Assign required pseudo-elements for cue passing track, child, + and false.
If isRoot is true:
+If pseudos["::cue"] is null or pseudos["::cue-background"] is
+ null, then throw an "InvalidStateError
"
+ DOMException
.
The track
attribute, on getting, must return the TextTrack
object of the text
@@ -40262,7 +40385,18 @@ interface TextTrackCue : EventTarget {
cue
and cuebackground
attributesWhen the cue
attribute is present, the element serves as a text track
+ cue.
When the cuebackground
attribute is present, the element serves as cue background
+ for a text track cue.
The cue
and cuebackground
attributes must each be present once.
The cue
and cuebackground
can be present on the same element.