diff --git a/source b/source index f97f80ec94..0910cf4601 100644 --- a/source +++ b/source @@ -3151,6 +3151,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • ProcessingInstruction interface
  • ShadowRoot interface
  • Text interface
  • +
  • Range interface
  • node document concept
  • document type concept
  • @@ -3274,6 +3275,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The term supported tokens
  • The concept of a DOM range, and the terms + start node, start, end, and boundary point as applied to ranges.
  • @@ -112995,6 +112997,88 @@ enum DOMParserSupportedType { +

    The createContextualFragment() + method

    + +

    The createContextualFragment() method has a number + of outstanding issues in the DOM Parsing and Serialization issue tracker, documenting various problems + with its specification.

    + +
    +
    docFragment = range.createContextualFragment(string)
    +
    +

    Returns a DocumentFragment created from the markup string string using + range's start node as the context in + which fragment is parsed.

    +
    +
    + +

    This method performs no sanitization to remove potentially-dangerous elements + and attributes like script or event handler content attributes.

    + +
    partial interface Range {
    +  [CEReactions, NewObject] DocumentFragment createContextualFragment(HTMLString string);
    +};
    + +
    + +

    Range's createContextualFragment(string) + method steps are:

    + +
      +
    1. Let node be this's start + node.

    2. + +
    3. Let element be null.

    4. + +
    5. If node implements Element, set element + to node.

    6. + +
    7. Otherwise, if node implements Text or + Comment, set element to node's parent + element.

    8. + +
    9. +

      If element is null or all of the following are true:

      + +
        +
      • element's node document is an HTML document;

      • + +
      • element's local name is + "html"; and

      • + +
      • element's namespace is the + HTML namespace,

      • +
      + +

      then set element to the result of creating an + element given this's node document, body, and the + HTML namespace.

      +
    10. + +
    11. Let fragment node be the result of invoking the fragment parsing + algorithm steps with element and string.

    12. + +
    13. +

      For each script of fragment node's + script element descendants:

      + +
        +
      1. Set script's already started to false.

      2. + +
      3. Set script's parser document to null.

      4. +
      +
    14. + +
    15. Return fragment node.

    16. +
    + +
    +

    Timers

    The setTimeout() and