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

Introduce an UnenumerableOperations extended attribute #719

Closed
wants to merge 3 commits into from
Closed
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
22 changes: 21 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -10096,6 +10096,23 @@ See [[#es-DOMString]] for the specific requirements that the use of [{{TreatNull
</div>


<h4 id="UnenumerableOperations" extended-attribute lt="UnenumerableOperations">[UnenumerableOperations]</h4>

The [{{UnenumerableOperations}}] [=extended attribute=] is only applicable to [=interfaces=].

If the [{{UnenumerableOperations}}] [=extended attribute=] appears on a [=interface=], it indicates
Ms2ger marked this conversation as resolved.
Show resolved Hide resolved
that all the [=interface=]'s [=operations=] are unenumerable.

The [{{UnenumerableOperations}}] [=extended attribute=] must
[=takes no arguments|take no arguments=].

The [{{UnenumerableOperations}}] [=extended attribute=] must be specified on [=interfaces=] if and
only if its [=interface/enclosing module=] is not null.

See [[#es-operations]] for the specific requirements that the use of [{{UnenumerableOperations}}]
entails.


<h4 id="Unforgeable" extended-attribute lt="Unforgeable">[Unforgeable]</h4>

If the [{{Unforgeable}}] [=extended attribute=] appears on
Expand Down Expand Up @@ -11215,14 +11232,17 @@ in which case they are exposed on every object that [=implements=] the interface
To <dfn>define the operations</dfn> |operations| of [=interface=] or [=namespace=] |definition| on |target|,
given [=Realm=] |realm|, run the following steps:

1. Let |enumerable| be <emu-val>false</emu-val> if |definition| is an [=interface=] that has
the [{{UnenumerableOperations}}] [=extended attribute=] and <emu-val>true</emu-val>
otherwise.
Comment on lines +11235 to +11237
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be defined for Stringifiers, Common iterator behavior § forEach and Iterable declarations, like I’m doing in #825.

1. [=list/For each=] [=operation=] |op| of |operations|:
1. If |op| is not [=exposed=] in |realm|, then [=iteration/continue=].
1. Let |method| be the result of [=creating an operation function=]
given |op|, |definition|, and |realm|.
1. Let |modifiable| be <emu-val>false</emu-val> if |op| is [=unforgeable=]
and <emu-val>true</emu-val> otherwise.
1. Let |desc| be the PropertyDescriptor{\[[Value]]: |method|,
\[[Writable]]: |modifiable|, \[[Enumerable]]: <emu-val>true</emu-val>,
\[[Writable]]: |modifiable|, \[[Enumerable]]: |enumerable|,
\[[Configurable]]: |modifiable|}.
1. Let |id| be |op|'s [=identifier=].
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|target|, |id|, |desc|).
Expand Down