Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Jul 31, 2025

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)

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …
  • Corresponding HTML AAM & ARIA in HTML issues & PRs:
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)

This allows reducing noise in the IDL for the common case that no argument needs passing to [Reflect].
<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
Copy link
Member

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>
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants