@@ -293,7 +293,7 @@ <h2>Extensibility</h2>
293
293
294
294
< pre class ="idl ">
295
295
[Constructor, Exposed=Window]
296
- interface XMLSerializer {
296
+ interface XMLSerializer {
297
297
DOMString serializeToString(Node root);
298
298
};
299
299
</ pre >
@@ -316,29 +316,30 @@ <h2>Extensibility</h2>
316
316
317
317
</ section > <!-- end XMLSerializer interface -->
318
318
319
- < section > < h2 > Extensions to the < code > < a > Element </ a > </ code > interface </ h2 >
319
+ < section > < h2 > The < dfn > InnerHTML </ dfn > mixin </ h2 >
320
320
321
321
< pre class ="idl ">
322
- partial interface Element {
322
+ interface mixin InnerHTML {
323
323
[CEReactions, TreatNullAs=EmptyString] attribute DOMString innerHTML;
324
- [CEReactions, TreatNullAs=EmptyString] attribute DOMString outerHTML;
325
- [CEReactions] void insertAdjacentHTML(DOMString position, DOMString text);
326
324
};
325
+
326
+ Element includes InnerHTML;
327
+ ShadowRoot includes InnerHTML;
327
328
</ pre >
328
329
329
330
<!-- innerHTML -->
330
331
331
- < p > The < dfn data-dfn-for ="Element "> < code > innerHTML</ code > </ dfn > IDL attribute represents the markup of the
332
- < code > < a > Element </ a > </ code > 's contents.
332
+ < p > The < dfn data-dfn-for ="InnerHTML "> < code > innerHTML</ code > </ dfn > IDL attribute represents the markup of the
333
+ element 's contents.
333
334
334
335
< dl class =domintro >
335
- < dt > < var > element</ var > . < a data-link-for ="Element "> innerHTML</ a > [ = < var > value</ var > ]
336
+ < dt > < var > element</ var > . < a data-link-for ="InnerHTML "> innerHTML</ a > [ = < var > value</ var > ]
336
337
< dd > Returns a fragment of HTML or XML that represents the element's contents.
337
338
338
339
< p > Can be set, to replace the contents of the element with nodes parsed from the given string.
339
340
340
341
< p > In the case of an < a > XML document</ a > , throws a "< code > < a > InvalidStateError</ a > </ code > "
341
- < code > < a > DOMException</ a > </ code > if the < code > < a > Element </ a > </ code > cannot be serialized to XML,
342
+ < code > < a > DOMException</ a > </ code > if the element cannot be serialized to XML,
342
343
or a "< code > < a > SyntaxError</ a > </ code > " < code > < a > DOMException</ a > </ code > if the given string is
343
344
not well-formed.
344
345
</ dl >
@@ -350,9 +351,12 @@ <h2>Extensibility</h2>
350
351
< p > On setting, these steps must be run:
351
352
352
353
< ol >
354
+ < li > Let < var > context element</ var > be the < a > context object</ a > 's
355
+ < a data-cite ="DOM#concept-documentfragment-host "> host</ a > if the < a > context object</ a > is a
356
+ < a > ShadowRoot</ a > object, or the < a > context object</ a > otherwise.
357
+
353
358
< li > Let < var > fragment</ var > be the result of invoking the < a > fragment parsing algorithm</ a > with
354
- the new value as < var > markup</ var > , and the < a > context object</ a > as the
355
- < var > context element</ var > .
359
+ the new value as < var > markup</ var > , and with < var > context element</ var > .
356
360
357
361
< li > If the < a > context object</ a > is a < code > < a > template</ a > </ code > element, then let
358
362
< a > context object</ a > be the < code > < a > template</ a > </ code > 's < a > template contents</ a > (a
@@ -365,6 +369,17 @@ <h2>Extensibility</h2>
365
369
< li > < a > Replace all</ a > with < var > fragment</ var > within the < a > context object</ a > .
366
370
</ ol >
367
371
372
+ </ section > <!-- end InnerHTML mixin -->
373
+
374
+ < section > < h2 > Extensions to the < code > < a > Element</ a > </ code > interface</ h2 >
375
+
376
+ < pre class ="idl ">
377
+ partial interface Element {
378
+ [CEReactions, TreatNullAs=EmptyString] attribute DOMString outerHTML;
379
+ [CEReactions] void insertAdjacentHTML(DOMString position, DOMString text);
380
+ };
381
+ </ pre >
382
+
368
383
<!-- outerHTML -->
369
384
370
385
< p > The < dfn data-dfn-for ="Element "> < code > outerHTML</ code > </ dfn > IDL attribute represents the markup of the
@@ -1790,6 +1805,12 @@ <h2>Dependencies</h2>
1790
1805
"< dfn > < a href ="https://www.w3.org/TR/dom/#syntaxerror "> SyntaxError</ a > </ dfn > ",
1791
1806
< li > < dfn > < a href ="https://www.w3.org/TR/dom/#xmldocument "> XMLDocument</ a > </ dfn >
1792
1807
</ ul >
1808
+
1809
+ The following terms used in this document are defined by [[DOM]]:
1810
+
1811
+ < ul >
1812
+ < li > The < dfn data-cite ="DOM#shadowroot "> ShadowRoot</ dfn > interface
1813
+ </ ul >
1793
1814
1794
1815
The following terms used in this document are defined by [[XML10]]:
1795
1816
0 commit comments