Re: [whatwg/webidl] Propagate a type's extended attributes to a nullable inner type (PR #1624)

nicolo-ribaudo left a comment (whatwg/webidl#1624)

About this from your Claude session:
```
  - index.bs:6539, index.bs:6557 — The new wording "the type of an argument |A|" / "the type of a [=dictionary member=] |M|" now also covers optional arguments and required members, so [Clamp] optional long x and [Clamp] required long m; become valid.
    - This reverses #691, which was closed because the old wording already limited this to non-optional arguments and non-required members. bzbarsky said [Clamp] optional short is not correct, and domenic agreed.
    - It also contradicts step 2's own example (optional [XAttr] long arg, required [XAttr] long member).
    - Fix: "…an argument |A| that is not declared with the <emu-t>optional</emu-t> keyword…" and "…a [=dictionary member=] |M| that is not [=dictionary member/required=]…". Don't write "not an [=optional argument=]": a final variadic argument counts as
      optional, so [Clamp] long... values would lose its [Clamp].
```

Note that there are some specs that do put the extended attribute before `optional`/`required`:
- https://serial.spec.whatwg.org/#serialoptions-dictionary
- https://www.w3.org/TR/webcodecs/#video-encoder-config

Restricting that would need also updates to those specs and _maybe_ to implementations? Happy to do it and open issues for those specs, just double-checking that you actually want it.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1624#issuecomment-5937070558
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1624/c5937070558@github.com>

Received on Thursday, 1 October 2026 17:43:56 UTC