Skip to content
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

Make it clearer that static and namespace attrs don't get to have state. Fixes #1133 #1135

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11880,8 +11880,8 @@ in which case they are exposed on every object that [=implements=] the interface

1. Let |steps| be the following series of steps:
1. Try running the following steps:
1. Let |idlObject| be null.
1. If |target| is an [=interface=], and |attribute| is a [=regular attribute=]:
1. If |target| is an [=interface=], and |attribute| is a [=regular attribute=],
let |R| initially be undefined and execute the following steps:
1. Let |esValue| be the <emu-val>this</emu-val> value, if it is not
<emu-val>null</emu-val> or <emu-val>undefined</emu-val>, or |realm|'s
[=Realm/global object=] otherwise.
Expand All @@ -11897,10 +11897,18 @@ in which case they are exposed on every object that [=implements=] the interface
1. Otherwise, [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
1. If |attribute|'s type is an [=observable array type=], then return |esValue|'s
[=backing observable array exotic object=] for |attribute|.
1. Set |idlObject| to the IDL [=interface type=] value that represents a reference
1. Let |idlObject| be the IDL [=interface type=] value that represents a reference
to |esValue|.
1. Let |R| be the result of running the [=getter steps=] of |attribute| with
|idlObject| as [=this=].
1. Set |R| to the result of running the [=getter steps=] of |attribute| with
|idlObject| as [=this=].

Otherwise, let |R| be the result of running the [=getter steps=] of |attribute| with
null as [=this=].

Note: [=Namespaces=] and [=interface=] objects (themselves,
rather than their instances) are not intended to carry state,
so their attribute getters intentionally do not get access to them.

1. Return the result of [=converted to an ECMAScript value|converting=] |R| to an
ECMAScript value of the type |attribute| is declared as.

Expand Down