-
Notifications
You must be signed in to change notification settings - Fork 294
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
Definition of valid shadow elements is ambiguous #745
Comments
That doesn't read well. It sounds like we should always throw NotSupportedError whenever the context object's local name is not a valid custom name. We need something like this:
or
|
I'd also support a list:
(Note that the rewording in OP is incorrect.) |
Oh, so "a valid custom element name" was intended to be one of the alternatives in that enumeration? Then it's even worse than I thought, because that meaning didn't even occur to me. I might have understood it like that if there had been a colon after the "not", maybe. @rniwa's first suggestion have that same problem IMO. The second suggestion is better but still rather convoluted. Perhaps making an explicit listing of alternatives is better: Context object’s local name must be one of the following:
If it's not, then throw a "NotSupportedError" DOMException. |
Hey @annevk, I would love to help in editing the dom.bs. BTW, for clarification the following should be done:
A suggestion though (a less verbose option):
Do let me know which one should be used : ) |
Thanks @Yash-Handa! I'd suggest:
|
https://dom.spec.whatwg.org/#dom-element-attachshadow
Item 2 in the list says:
The above sentence is ambiguous. The enumeration can be read both as a list of valid names, or as a list of invalid names. The sentence is also unnecessarily complex. I would suggest:
If context object’s local name is not a valid custom element name, then throw a "NotSupportedError" DOMException. The only valid names are: "article", "aside", "blockquote", "body", "div", "footer", "h1", "h2", "h3", "h4", "h5", "h6", "header", "main" "nav", "p", "section", and "span".
The text was updated successfully, but these errors were encountered: