From 7e0bb3f4bca6b8f678d3cfd57a4cc98777f6824a Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Date: Thu, 23 Mar 2017 14:11:02 +0900
Subject: [PATCH] Use Web IDL to construct custom element constructors
This fixes part of #2381 (the other part is in DOM's "create an
element").
---
source | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/source b/source
index 70a37e47ce3..fa65992b73f 100644
--- a/source
+++ b/source
@@ -2778,7 +2778,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
creating a frozen array
callback this value
converting between Web IDL types and JS types
- invoke the Web IDL callback function
+ invoking and
+ constructing callback functions
converting to a
sequence of Unicode scalar values
@@ -66451,7 +66452,9 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
Several of these requirements are checked during element
creation, either directly or indirectly, and failing to follow them will result in a custom
- element that cannot be instantiated by the parser or DOM APIs.
+ element that cannot be instantiated by the parser or DOM APIs. This is true even if the work is
+ done inside a constructor-initiated microtask, as a microtask checkpoint can occur immediately after construction.
Core concepts
@@ -66604,7 +66607,8 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
A constructor
- A custom element constructor
+ A Web IDL Function
callback function type value wrapping
+ the custom element constructor
A list of observed
attributes
@@ -67020,7 +67024,9 @@ customElements.define("x-foo", class extends HTMLElement {
-
-
Let constructResult be Construct(C).
+ Let constructResult be the result of constructing C with no
+ arguments.
If C non-conformantly
uses an API decorated with the [CEReactions]
extended