Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent attachInternals() use before custom element constructor #5909

Merged
merged 1 commit into from
Sep 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -66871,6 +66871,9 @@ customElements.define("x-foo", class extends HTMLElement {
does.</p>
</li>

<li><p>Set <var>element</var>'s <span>custom element state</span> to "<code
data-x="">precustomized</code>".</p></li>

<li>
<p>Let <var>constructResult</var> be the result of <span
data-x="es-constructing-callback-functions">constructing</span> <var>C</var>, with no
Expand Down Expand Up @@ -66930,7 +66933,8 @@ customElements.define("x-foo", class extends HTMLElement {
</ol>

<p class="note">If the above steps threw an exception, then <var>element</var>'s <span>custom
element state</span> will remain "<code data-x="">failed</code>".</p>
element state</span> will remain "<code data-x="">failed</code>" or "<code
data-x="">precustomized</code>".</p>
</li>

<li>
Expand Down Expand Up @@ -67435,6 +67439,10 @@ dictionary <dfn>ValidityStateFlags</dfn> {
<li><p>If <var>element</var>'s <span>attached internals</span> is true, then throw an
<span>"<code>NotSupportedError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If <var>element</var>'s <span>custom element state</span> is not "<code
data-x="">precustomized</code>" or "<code data-x="">custom</code>", then throw a
<span>"<code>NotSupportedError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Set <var>element</var>'s <span>attached internals</span> to true.</p></li>

<li><p>Create a new <code>ElementInternals</code> instance
Expand Down