Skip to content

Commit

Permalink
Use "NotSupportedError" when trying to attachShadow() twice
Browse files Browse the repository at this point in the history
Discussed in #760. This makes the various cases less distinguishable,
which is desirable. With this change, all three cases behave the same
between:

- A custom element with disabled-shadow
- A custom element with a shadow tree
- A built-in element on the blocklist
  • Loading branch information
domenic committed May 16, 2019
1 parent e4e0ea8 commit bcdab96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6768,7 +6768,7 @@ invoked, must run these steps:
"<code>span</code>", then <a>throw</a> a "{{NotSupportedError!!exception}}" {{DOMException}}.

<li><p>If <a>context object</a> is a <a for=Element>shadow host</a>, then <a>throw</a> an
"{{InvalidStateError!!exception}}" {{DOMException}}.
"{{NotSupportedError!!exception}}" {{DOMException}}.

<li><p>Let <var>shadow</var> be a new <a for=/>shadow root</a> whose <a for=Node>node document</a>
is <a>context object</a>'s <a for=Node>node document</a>, <a for=DocumentFragment>host</a> is
Expand Down

0 comments on commit bcdab96

Please sign in to comment.