- From: ShinWonho <notifications@github.com>
- Date: Tue, 03 Nov 2026 23:11:12 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/pull/1661@github.com>
In the [attribute setter](https://webidl.spec.whatwg.org/#dfn-attribute-setter) algorithm, |id| is declared inside |steps|, but used outside it:
> 1. Let |steps| be the following series of steps:
> 1. Let |V| be undefined.
> 1. If any arguments were passed, then set |V| to the value of the first argument passed.
> 1. Let |id| be |attribute|'s identifier.
> 1. …
> 1. Let |name| be the string "`set `" prepended to |id|.
> 1. Let |F| be CreateBuiltinFunction(|steps|, 1, |name|, « », |realm|).
Since [variables are block scoped](https://infra.spec.whatwg.org/#variables), |id| is not in scope where |name| is computed.
This PR uses |attribute|'s identifier directly, the same way the [attribute getter](https://webidl.spec.whatwg.org/#dfn-attribute-getter) does:
> 1. Let |name| be the string "`set `" prepended to |attribute|'s identifier.
You can view, comment on, or merge this pull request online at:
https://github.com/whatwg/webidl/pull/1661
-- Commit Summary --
* Editorial: don't use |id| outside the attribute setter's steps
-- File Changes --
M index.bs (2)
-- Patch Links --
https://github.com/whatwg/webidl/pull/1661.patch
https://github.com/whatwg/webidl/pull/1661.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1661
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/pull/1661@github.com>
Received on Wednesday, 4 November 2026 07:11:17 UTC