From 29cdf7edbe1c65b467c56040d7af544d7be39034 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Thu, 11 Jun 2020 16:13:21 -0700 Subject: [PATCH] Addressed annevk's comments --- source | 117 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 53 deletions(-) diff --git a/source b/source index a87e396c194..f6c5d743004 100644 --- a/source +++ b/source @@ -2900,6 +2900,11 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Element interface
  • attachShadow() method.
  • An element's shadow root
  • +
  • A shadow root's mode
  • +
  • A shadow root's is declarative shadow root flag
  • +
  • The attach a + shadow root algorithm
  • +
  • The shadowRoot attribute
  • The retargeting algorithm
  • Node interface
  • NodeList interface
  • @@ -2910,7 +2915,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • node document concept
  • document type concept
  • host concept
  • -
  • The shadow root concept, and its delegates focus
  • +
  • The shadow root concept, and its delegates focus
  • The shadow host concept
  • HTMLCollection interface, its length attribute, and its @@ -14943,7 +14948,7 @@ interface HTMLStyleElement : HTMLElement {
  • If element has an associated CSS style sheet, remove the CSS style sheet in question.

  • -
  • If element's root is neither a shadow root nor a +

  • If element's root is neither a shadow root nor a document, then return.

  • HTML fragment serialization algorithm. The algorithm takes as input a DOM Element, Document, or DocumentFragment referred to as - the node, and a boolean referred to as include shadow roots whose default value is false, and returns a string.

    + the node, a boolean referred to as include shadow roots, and a + sequence<ShadowRoot> referred to as closed shadow roots, and returns a string.

    This algorithm serializes the children of the node being serialized, not the node itself.

    @@ -111848,39 +111862,36 @@ document.body.appendChild(text); true, then:
      -
    1. Append the literal string "<template shadowroot="" (U+003C LESS-THAN SIGN, - U+0074 LATIN SMALL LETTER T, U+0065 LATIN SMALL LETTER E, U+006D LATIN SMALL LETTER M, - U+0070 LATIN SMALL LETTER P, U+006C LATIN SMALL LETTER L, U+0061 LATIN SMALL LETTER A, - U+0074 LATIN SMALL LETTER T, U+0065 LATIN SMALL LETTER E, U+0020 SPACE, - U+0073 LATIN SMALL LETTER S, U+0068 LATIN SMALL LETTER H, U+0061 LATIN SMALL LETTER A, - U+0064 LATIN SMALL LETTER D, U+006F LATIN SMALL LETTER O, U+0077 LATIN SMALL LETTER W, - U+003D EQUALS SIGN, U+0022 QUOTATION MARK).

    2. - -
    3. If shadow root's mode - is "open", then append the literal - string "open" (U+006F LATIN SMALL LETTER O, U+0070 LATIN SMALL LETTER P, - U+0065 LATIN SMALL LETTER E, U+006E LATIN SMALL LETTER N).

    4. - -
    5. If shadow root's mode - is "closed", then append the literal - string "closed" (U+0063 LATIN SMALL LETTER C, U+006C LATIN SMALL LETTER L, - U+006F LATIN SMALL LETTER O, U+0073 LATIN SMALL LETTER S, U+0065 LATIN SMALL LETTER E, - U+0064 LATIN SMALL LETTER D).

    6. - -
    7. Append the literal string "">" (U+0022 QUOTATION MARK, - U+003E GREATER-THAN SIGN).

    8. - -
    9. Append the value of running the HTML fragment serialization algorithm on the - shadow root element (thus recursing into this algorithm for that - element).

    10. - -
    11. Append the literal string "</template>" (U+003C LESS-THAN SIGN, U+002F SOLIDUS, - U+0074 LATIN SMALL LETTER T, U+0065 LATIN SMALL LETTER E, U+006D LATIN SMALL LETTER M, - U+0070 LATIN SMALL LETTER P, U+006C LATIN SMALL LETTER L, U+0061 LATIN SMALL LETTER A, - U+0074 LATIN SMALL LETTER T, U+0065 LATIN SMALL LETTER E, U+003E GREATER-THAN SIGN).

    12. +
    13. Let shadow root be equal to the node's shadow root. + +

    14. If shadow root's mode + is "closed", and shadow root is not contained in closed shadow roots, + then skip the next step. +

    15. Otherwise: + +

        +
      1. Append the literal string "<template shadowroot="".

      2. + +
      3. If shadow root's mode + is "open", then append the literal + string "open".

      4. + +
      5. If shadow root's mode + is "closed", then append the literal + string "closed".

      6. + +
      7. Append the literal string "">".

      8. + +
      9. Append the value of running the HTML fragment serialization algorithm on the + shadow root DocumentFragment (thus recursing into this algorithm for that + element).

      10. + +
      11. Append the literal string "</template>".

      12. + +
    - +
  • Return s.