diff --git a/source b/source index 3d6d29d1f53..581e7f180b6 100644 --- a/source +++ b/source @@ -70445,8 +70445,8 @@ interface HTMLTemplateElement : HTMLElement {
To prepare content patching given an Element or
- DocumentFragment scope and a template element
- template:
DocumentFragment scope, a template element
+ template, and a Document parserDocument:
Assert: template's for
@@ -70489,6 +70489,21 @@ interface HTMLTemplateElement : HTMLElement {
Let scopeDocument be scope's node document.
Increment scopeDocument's throw-on-dynamic-markup-insertion + counter.
If parserDocument is not scopeDocument, then increment + parserDocument's throw-on-dynamic-markup-insertion counter.
+ +parserDocument can differ from scopeDocument when script
+ moves an insertion target into another document mid-parse, or in the fragment
+ case where parserDocument is the inert Document with which the
+ fragment parser is associated.
For each node of removedNodes:
@@ -70505,6 +70520,12 @@ interface HTMLTemplateElement : HTMLElement {If parserDocument is not scopeDocument, then decrement + parserDocument's throw-on-dynamic-markup-insertion counter.
Decrement scopeDocument's throw-on-dynamic-markup-insertion + counter.
Return true.
Document objects have a throw-on-dynamic-markup-insertion counter,
- which is used in conjunction with the create an element for the token algorithm to
- prevent custom element constructors from being
- able to use document.open(), create an element for the token and
+ prepare content patching algorithms to prevent scripts (such as custom element constructors and pagehide event handlers) from being able to use document.open(), document.close(), and document.write() when they are invoked by the parser.
- Initially, the counter must be set to zero.
Document is an XML document.
Throws an "InvalidStateError" DOMException if the
- parser is currently executing a custom element constructor.
template element's for attribute.
window = document.open(url, name, features)Document is an XML document.
Throws an "InvalidStateError" DOMException if the
- parser is currently executing a custom element constructor.
template element's for attribute.
@@ -126818,7 +126843,8 @@ document.body.appendChild(frame)
invoked on XML documents.
Throws an "InvalidStateError" DOMException if the
- parser is currently executing a custom element constructor.
template element's for attribute.
@@ -126937,7 +126963,8 @@ document.body.appendChild(frame)
invoked on XML documents.
Throws an "InvalidStateError" DOMException if the
- parser is currently executing a custom element constructor.
template element's for attribute.
@@ -147757,6 +147784,8 @@ dictionary StorageEventInit : EventInit {
Let willExecuteScript be true if definition is non-null and the parser's fragment context element is null; otherwise false.
Let parserDocument be the parser's Document.
If willExecuteScript is true:
@@ -147764,6 +147793,9 @@ dictionary StorageEventInit : EventInit {Increment document's throw-on-dynamic-markup-insertion counter.
If parserDocument is not document, then increment + parserDocument's throw-on-dynamic-markup-insertion counter.
If the JavaScript execution context stack is empty, then perform a microtask checkpoint.
Invoke custom element reactions in queue.
If parserDocument is not document, then decrement + parserDocument's throw-on-dynamic-markup-insertion counter.
Decrement document's throw-on-dynamic-markup-insertion counter.
Let success be the result of preparing content patching given scope and - template.
Document.
If success is false, then insert an element at the adjusted insertion location with template,