Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used.#11518
Imply [Reflect] when [ReflectRange] or [ReflectDefault] are used.#11518lukewarlow wants to merge 1 commit intowhatwg:mainfrom
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
| 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.
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.
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.)