Skip to content

Introduce attribute reflection extended attributes - #11450

Merged
annevk merged 16 commits into
whatwg:mainfrom
lukewarlow:reflect-idl
Jul 30, 2025
Merged

Introduce attribute reflection extended attributes#11450
annevk merged 16 commits into
whatwg:mainfrom
lukewarlow:reflect-idl

Conversation

@lukewarlow

@lukewarlow lukewarlow commented Jul 14, 2025

Copy link
Copy Markdown
Member

A number of extended attributes are added which trigger IDL attribute reflection:

  • [Reflect] and [Reflect=string] cover basic content attribute reflection cases.

  • [ReflectSetter] and [ReflectSetter=string] covers content attribute reflection only for setters.

  • [ReflectURL] and [ReflectURL=string] covers reflection of USV attributes, which represent URLs.

  • [ReflectNonNegative] and [ReflectNonNegative=string] covers reflection of long attributes that should be limited to only non-negative numbers.

  • [ReflectPositive] and [ReflectPositive=string] covers reflection of double and unsigned long attributes which should be limited to positive numbers.

  • [ReflectPositiveWithFallback] and [ReflectPositiveWithFallback=string] covers reflection of double and unsigned long attributes which should be limited to positive numbers with fallback.

Additionally:

  • [ReflectRange=(integer, integer)] can be used alongside others on unsigned long attributes that should be clamped to a range.

  • [ReflectDefault=number] can be used alongside others on double, long and unsigned long attributes that should be reflected with a default value.

Depends on: whatwg/webidl#1503

See #3238

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


/common-dom-interfaces.html ( diff )
/dom.html ( diff )
/edits.html ( diff )
/embedded-content-other.html ( diff )
/embedded-content.html ( diff )
/form-control-infrastructure.html ( diff )
/form-elements.html ( diff )
/forms.html ( diff )
/grouping-content.html ( diff )
/iframe-embed-object.html ( diff )
/image-maps.html ( diff )
/index.html ( diff )
/input.html ( diff )
/interaction.html ( diff )
/interactive-elements.html ( diff )
/links.html ( diff )
/media.html ( diff )
/obsolete.html ( diff )
/popover.html ( diff )
/scripting.html ( diff )
/semantics.html ( diff )
/tables.html ( diff )
/text-level-semantics.html ( diff )

Loading
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.

4 participants