diff --git a/source b/source index 73646634775..3ec0a10a684 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 @@ -3185,7 +3186,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

  • The find flattened slottables algorithm
  • The manual slot assignment concept
  • The assign a slot algorithm
  • -
  • The pre-insert, insert, append, replace, replace all, string replace all, remove, and adopt algorithms for nodes
  • +
  • The pre-insert, ensure pre-insertion validity, insert, append, replace, replace all, string replace all, remove, and adopt algorithms for nodes
  • The descendant concept
  • The insertion steps, removing steps, @@ -3271,6 +3272,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • aborted
  • signal abort
  • The get an attribute by name algorithm
  • +
  • The exclusive Text node concept
  • The following features are defined in UI Events: UIEVENTS

    @@ -11684,6 +11686,10 @@ interface HTMLElement : Element { [CEReactions] attribute boolean translate; [CEReactions] attribute DOMString dir; + // TextTrackCue related + [CEReactions] attribute boolean cuebackground; + [CEReactions] attribute boolean cue; + // user interaction [CEReactions] attribute (boolean or unrestricted double or DOMString)? hidden; [CEReactions] attribute boolean inert; @@ -12941,6 +12947,8 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
  • autocapitalize
  • autofocus
  • contenteditable
  • +
  • cue
  • +
  • cuebackground
  • dir
  • draggable
  • enterkeyhint
  • @@ -39074,6 +39082,31 @@ interface VideoTrack {

    An arbitrary string.

    +
    A text track cue fragment +
    +

    A DocumentFragment that is the content of the cue and is composed of one ore + more of the allowed text track cue elements and exclusive Text nodes.

    +
    + +
    Allowed text track cue elements
    +
    +

    The b, br, i, div, p, rb, rt, rtc, ruby, and the span element.

    +
    + +
    Cue background
    +
    +

    One or more of the allowed text track cue elements in a + text track cue fragment that has a cuebackground + attribute.

    +

    + A cue background can be selected and styles via the CSS ::cuebackground pseudo-element. +

    +
    +
    A start time

    The time, in seconds and fractions of a second, that describes the beginning of the range of @@ -39099,6 +39132,7 @@ interface VideoTrack { example, WebVTT has a text track cue writing direction and so forth. WEBVTT

    +

    An unbounded text track cue is a text track cue @@ -40124,6 +40158,7 @@ interface TextTrackCueList {

    [Exposed=Window]
     interface TextTrackCue : EventTarget {
    +  constructor(double startTime, double endTime, DocumentFragment cueFragment);
       readonly attribute TextTrack? track;
     
       attribute DOMString id;
    @@ -40136,6 +40171,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 +40214,122 @@ interface TextTrackCue : EventTarget {

    +

    The TextTrackCue(startTime, endTime, + cueFragment) constructor runs the following steps:

    + +
      +
    1. If cueFragment first child is null or a Text node, then throw an + "InvalidNodeTypeError" DOMException.

    2. +
    3. +

      For each child in cueFragment's children:

      +
        +
      1. Ensure child is an allowed cue + descendant.

      2. +
      +
    4. +
    5. Let fragment be a newly created DocumentFragment using + this's relevant global object's associated Document.

    6. +
    7. +

      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.

      +
    8. +
    9. +

      Append clones into fragment. + Rethrow any exceptions.

      Append + runs the ensure pre-insertion validity algorithm, which can throw.

      +
    10. +
    11. Assure the required elements for cue passing + fragment and a new map «[ "cuebackground" → null, "cue" → null ]». Rethrow any + exceptions.

    12. +
    13. Set this's text track cue fragment to + fragment.

    14. +
    15. Set this's text track cue start time to + startTime.

    16. +
    17. Set this's text track cue end time to + endTime.

    18. +
    19. Return this.

    20. +
    + +

    To ensure Node node is an allowed + cue descendant, run these steps:

    +
      +
    1. If node is not an exclusive Text node or is not an + Element, then throw "InvalidNodeTypeError" + DOMException.

    2. +
    3. +

      If node is an Element:

      +
        +
      1. If node's namespace is not in the HTML namespace, then throw + "InvalidNodeTypeError" DOMException.

      2. +
      3. If node is not one of the allowed text track cue elements, then + throw "InvalidNodeTypeError" DOMException.

      4. +
      5. +

        For each child of node in tree order: +

          +
        1. Ensure child is an allowed cue + descendant.

        2. +
        +
      6. +
      +
    4. +
    + +

    To Assure the required elements for cue with + Node node, and map + requiredElements:

    +
      +
    1. +

      If node is a DocumentFragment:

      +
        +
      1. +

        For each child of node in tree order:

        +
          +
        1. Assure the required elements for cue + passing child and requiredElements.

        2. +
        +
      2. +
      3. If requiredElements["cue"] is null or + requiredElements["cuebackground"] is null, then throw an + "InvalidNodeTypeError" DOMException.

      4. +
      +
    2. +
    3. +

      If node is an Element:

      +
        +
      1. +

        If requiredElements["cuebackground"] is null:

        +
          +
        1. Set requiredElements["cuebackground"] to the result of getting an + attribute in the HTML namespace, "cuebackground", node.

        2. +
        +
      2. +
      3. +

        If requiredElements["cue"] is null:

        +
          +
        1. Let cue be the result of getting an attribute in the HTML + namespace, "cue", node.

        2. +
        3. +

          If cue is not null:

          +
            +
          1. Let backgroundCue be + requiredElements["cuebackground"].

          2. +
          3. If backgroundCue is null, then throw a + "HierarchyRequestError" DOMException.

          4. +
          5. If backgroundCue is not an inclusive ancestor of cue, then + throw a "HierarchyRequestError" + DOMException.

          6. +
          7. Set requiredElements["cue"] to cue and break.

          8. +
          +
        4. +
        +
      4. +
      +
    4. +
    5. If node is an any other type, continue.

    6. +

    The track attribute, on getting, must return the TextTrack object of the text @@ -40219,6 +40374,7 @@ interface TextTrackCue : EventTarget { unset otherwise.

    +
    Event handlers for objects of the text track APIs

    The following are the event handlers that (and their corresponding TextTrackCue : EventTarget { +

    The cue and cuebackground attributes
    + +

    When the cue content attribute is present, the element serves as a + text track cue. A text track cue fragment must contain one or + more text track cues.

    + +

    The cue IDL attribute must reflect the content + attribute of the same name.

    + +

    When the cuebackground attribute is present, the + element serves as cue background for a text track cue.

    + +

    The cuebackground IDL attribute must + reflect the content attribute of the same name.

    + +

    The cue and cuebackground attributes must each be present at least once + in a text track cue fragment.

    + +

    The cue and cuebackground can be present on the same element.

    + + +
    Best practices for metadata text tracks
    @@ -136085,6 +136266,34 @@ interface External { video How the element handles crossorigin requests "anonymous"; "use-credentials" + + cue + b + br + i + div + p + rb + rt + rtc + ruby + span + The element serve as a text track cue + Boolean attribute + + cuebackground + b + br + i + div + p + rb + rt + rtc + ruby + span + The element serve as a cue background + Boolean attribute data object