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

annevk left a comment (whatwg/webidl#1624)

Claude uncovered one more issue here and a couple of nits that seem valid:
```
  - 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].

  Nits
  
  - index.bs:6204 — "For any type |X|" is misleading, because every use passes a category (integer type, buffer view type). Try "For any type or category of types |X|".
  - index.bs:6531–6538 — The example puts [Clamp] on an argument, so it also depends on the argument step. To match the union example, use attribute [XAttr] long? attrib;.
  - index.bs:11112–11115 — After "cannot be used on a nullable type", "even DOMString?" no longer reads well, and the note says "must not". Suggest: "…[LegacyNullToEmptyString] cannot be used on a nullable type such as DOMString?, since null is already a valid
    value of that type."
  - index.bs:9607–9608 — "backed by an {{SharedArrayBuffer}}" should be "a". The line is already rewrapped, and the PR fixes other typos in passing.

```

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

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

Received on Monday, 28 September 2026 06:51:41 UTC