Skip to content

Commit 272e8ff

Browse files
authoredApr 24, 2024··
Remove createContextualFragment() method
This has been moved to the HTML Standard in whatwg/html#10283.
1 parent 43114e6 commit 272e8ff

File tree

1 file changed

+2
-71
lines changed

1 file changed

+2
-71
lines changed
 

‎index.html

+2-71
Original file line numberDiff line numberDiff line change
@@ -272,73 +272,10 @@ <h2>Extensibility</h2>
272272

273273
<section><h2>Extensions to the <code><a>Range</a></code> interface</h2>
274274

275-
<pre class="idl">
276-
partial interface Range {
277-
[CEReactions, NewObject] DocumentFragment createContextualFragment(HTMLString fragment);
278-
};
279-
</pre>
280-
281-
<dl class=domintro>
282-
<dt><var>docFragment</var> = <var>range</var> . <a data-link-for="Range">createContextualFragment</a> ( <var>fragment</var> )
283-
<dd>Returns a <code><a>DocumentFragment</a></code>, created from the markup string
284-
<var>fragment</var> using <var>range</var>'s start node as the context in which
285-
<var>fragment</var> is parsed.
286-
</dl>
287-
288-
<p>The <dfn data-dfn-for="Range" data-lt="createContextualFragment"><code>createContextualFragment(<var>fragment</var>)</code></dfn> method
289-
must run these steps:
290-
291-
<ol>
292-
<li>Let <var>node</var> be the <a>context object</a>'s <a>start node</a>.
293-
294-
<p>Let <var>element</var> be as follows, depending on <var>node</var>'s interface:
295-
296-
<dl class=switch>
297-
<dt><code><a>Document</a></code>
298-
<dt><code><a>DocumentFragment</a></code>
299-
<dd>null
300-
301-
<dt><code><a>Element</a></code>
302-
<dd><var>node</var>
303-
304-
<dt><code><a>Text</a></code>
305-
<dt><code><a>Comment</a></code>
306-
<dd><var>node</var>'s <a data-cite="DOM#parent-element">parent element</a>
307-
308-
<dt><code><a>DocumentType</a></code>
309-
<dt><code><a>ProcessingInstruction</a></code>
310-
<dd>[[DOM4]] prevents this case.
311-
</dl>
275+
<span id="dom-range-createcontextualfragment"></span>
312276

313-
<li>If either <var>element</var> is null or the following are all true:
277+
<p>The definition of <code>createContextualFragment</code> has moved to <a href="https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#the-createcontextualfragment()-method">the HTML Standard</a>.</p>
314278

315-
<ul>
316-
<li><var>element</var>'s <a>node document</a> is an <a>HTML document</a>,
317-
318-
<li><var>element</var>'s <a>local name</a> is "<code>html</code>", and
319-
320-
<li><var>element</var>'s <a data-lt="concept namespace">namespace</a> is the
321-
<a>HTML namespace</a>;
322-
</ul>
323-
324-
<p>let <var>element</var> be a new <a>Element</a> with
325-
326-
<ul>
327-
<li>"<code>body</code>" as its <a>local name</a>,
328-
329-
<li>The <a>HTML namespace</a> as its <a data-lt="concept namespace">namespace</a>, and
330-
331-
<li>The <a>context object</a>'s <a>node document</a> as its <a>node document</a>.
332-
</ul>
333-
334-
<li>Let <var>fragment node</var> be the result of invoking the <a>fragment parsing algorithm</a>
335-
with <var>fragment</var> as <var>markup</var>, and <var>element</var> as the
336-
<var>context element</var>.
337-
338-
<li>Unmark all scripts in <var>fragment node</var> as "already started" and as "parser-inserted".
339-
340-
<li>Return the value of <var>fragment node</var>.
341-
</ol>
342279
</section><!-- end Extensions to the Range interface -->
343280

344281

@@ -1517,12 +1454,6 @@ <h2>Dependencies</h2>
15171454
<ul>
15181455
<li>The <dfn data-lt="LegacyNullToEmptyString"><a href="https://heycam.github.io/webidl/#LegacyNullToEmptyString">[LegacyNullToEmptyString]</a></dfn> IDL <a>extended attribute</a>
15191456
</ul>
1520-
1521-
The Trusted Types [[TRUSTED-TYPES]] specification defines:
1522-
1523-
<ul>
1524-
<li>The <dfn data-lt="HTMLString"><a href="https://w3c.github.io/trusted-types/dist/spec/#typedefdef-htmlstring">HTMLString</a></dfn> IDL <a>typedef</a>
1525-
</ul>
15261457
</section>
15271458

15281459
<section class=appendix>

0 commit comments

Comments
 (0)
Please sign in to comment.