-
Notifications
You must be signed in to change notification settings - Fork 3k
Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used. #11518
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
base: main
Are you sure you want to change the base?
Conversation
5c5bfa1
to
4989cc8
Compare
This allows reducing noise in the IDL for the common case that no argument needs passing to [Reflect].
4989cc8
to
ad3b725
Compare
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> we also | ||
introduce <dfn extended-attribute data-lt="ReflectRange" | ||
<p>To supplement the above <span data-x="extended attribute">extended attributes</span> <dfn | ||
extended-attribute data-lt="ReflectRange" | ||
data-x="xattr-ReflectRange"><code>[ReflectRange]</code></dfn>, and <dfn extended-attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the comma here as there's only two alternatives.
any primary <span data-x="reflect">reflection</span> <span>extended attribute</span> except <code | ||
data-x="xattr-Reflect">[Reflect]</code>. If there is no primary <span | ||
data-x="reflect">reflection</span> <span>extended attribute</span> then, <code | ||
data-x="xattr-Reflect">[Reflect]</code> with no argument is implied.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can constrain it even further to only allow Reflect when its identifier is present?
Note that #11086 adds another instance to remove. |
Apologies for the delay on this I didn't managed to fix it up before annual leave but it's on my to-do list for when I'm back. |
No apology needed. Hope you have a good break! |
I'm somewhat negative on this. I still prefer the hierarchy of there being a "primary" reflection xattr, which takes the name when necessary and establishes the reflection, and then additional reflection metadata xattrs, which support the primary one. Saying that you can omit the primary one in the specific case where the IDL and content attribute names lowercase to the same thing, and there happens to be additional reflection metadata, is a hard rule to understand, IMO. |
I'm not particularly fussed either way, it does cut down on some noise to do this but equally its effectively editorial so I'll leave it to the spec editors to decide. |
Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used.
This allows reducing noise in the IDL for the common case that no argument needs passing to [Reflect].
Based on suggestion in #11455 (comment)
(See WHATWG Working Mode: Changes for more details.)