@@ -6041,20 +6041,14 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
6041
6041
<li><p> Set <var> result</var> to the result of <a>constructing</a> <var> C</var> , with no
6042
6042
arguments.
6043
6043
6044
+ <li><p> Assert: <var> result</var> 's <a for=Element>custom element state</a> and
6045
+ <a for=Element>custom element definition</a> are initialized.
6046
+
6044
6047
<li>
6045
- <p> If <var> result</var> does not implement the {{HTMLElement}} interface, then <a>throw</a> a
6046
- <code> TypeError</code> .
6047
-
6048
- <div class=note>
6049
- <p> This is meant to be a brand check to ensure that the object was allocated by the HTML
6050
- element constructor. See <a href="https://github.com/heycam/webidl/issues/97">webidl #97</a>
6051
- about making this more precise.
6052
-
6053
- <p> If this check passes, then <var> result</var> will already have its
6054
- <a for=Element>custom element state</a> and <a for=Element>custom element definition</a>
6055
- initialized.
6056
- </div>
6057
- </li>
6048
+ <p> Assert: <var> result</var> 's <a for=Element>namespace</a> is the <a>HTML namespace</a> .
6049
+
6050
+ <p class=note> IDL enforces that <var> result</var> is an {{HTMLElement}} object, which all use
6051
+ the <a>HTML namespace</a> .
6058
6052
6059
6053
<li><p> If <var> result</var> 's <a for=Element>attribute list</a> <a for=list>is not empty</a> ,
6060
6054
then <a>throw</a> a "{{NotSupportedError!!exception}} " {{DOMException}} .
@@ -6068,17 +6062,6 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
6068
6062
<li><p> If <var> result</var> 's <a for=Node>node document</a> is not <var> document</var> , then
6069
6063
<a>throw</a> a "{{NotSupportedError!!exception}} " {{DOMException}} .
6070
6064
6071
- <li>
6072
- <p> If <var> result</var> 's <a for=Element>namespace</a> is not the <a>HTML namespace</a> ,
6073
- then <a>throw</a> a "{{NotSupportedError!!exception}} " {{DOMException}} .
6074
-
6075
- <p class="note"> As of the time of this writing, every element that implements the
6076
- {{HTMLElement}} interface is also in the <a>HTML namespace</a> , so this check is currently
6077
- redundant with the above brand check. However, this is not guaranteed to be true forever in
6078
- the face of potential specification changes, such as converging certain SVG and HTML
6079
- interfaces.
6080
- </li>
6081
-
6082
6065
<li><p> If <var> result</var> 's <a for=Element>local name</a> is not equal to
6083
6066
<var> localName</var> , then <a>throw</a> a "{{NotSupportedError!!exception}} " {{DOMException}} .
6084
6067
0 commit comments