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

Editorial: Replace CreateMethodProperty with DefineMethodProperty #1390

Closed
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: 11 additions & 11 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -12328,8 +12328,8 @@ then there must exist a property with the following characteristics:
of [=interface=] |definition| on |target|, given [=realm=] |realm|, run the following steps:

1. If |definition| has an [=indexed property getter=], then:
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}},
{{%Array.prototype.values%}}).
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}},
{{%Array.prototype.values%}}, <emu-val>false</emu-val>).
1. If |definition| has a [=value iterator=], then:
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>",
{{%Array.prototype.entries%}}).
Expand All @@ -12354,7 +12354,7 @@ then there must exist a property with the following characteristics:
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1. Perform [$SetFunctionLength$](|F|, 0).
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|).
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}}, |F|, <emu-val>false</emu-val>).
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1. Define the <code class="idl">keys</code> method:
1. Let |steps| be the following series of steps:
Expand Down Expand Up @@ -12546,7 +12546,7 @@ and the string "<code> Iterator</code>".
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1. Perform [$SetFunctionLength$](|F|, 0).
1. Perform [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
1. Perform [$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, <emu-val>false</emu-val>).
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
<code class="idl">keys</code> method:
Expand Down Expand Up @@ -12596,7 +12596,7 @@ and the string "<code> Iterator</code>".
1. Perform [$SetFunctionLength$](|F|, 0).
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>", |F|).
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
[$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
[$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, <emu-val>false</emu-val>).
</div>

<div algorithm>
Expand Down Expand Up @@ -13508,31 +13508,31 @@ the realm given as an argument.
1. Let |id| be |interface|'s [=identifier=].
1. Let |interfaceObject| be the result of [=create an interface object|creating
an interface object=] for |interface| with |id| in |realm|.
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, <emu-val>false</emu-val>).
1. If the |interface| is declared with a [{{LegacyWindowAlias}}] [=extended attribute=],
and |target| implements the {{Window}} [=interface=], then:
1. [=list/iterate|For every=] [=LegacyWindowAlias identifier|identifier=] |id| in
[{{LegacyWindowAlias}}]'s [=LegacyWindowAlias identifier|identifiers=]:
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, <emu-val>false</emu-val>).
1. If the |interface| is declared with a [{{LegacyFactoryFunction}}] [=extended attribute=],
then:
1. [=list/iterate|For every=] [=LegacyFactoryFunction identifier|identifier=] |id| in
[{{LegacyFactoryFunction}}]'s [=LegacyFactoryFunction identifier|identifiers=]:
1. Let |legacyFactoryFunction| be the result of
[=create a legacy factory function|creating a legacy factory function=] with
|id| for |interface| in |realm|.
1. Perform [$CreateMethodProperty$](|target|, |id|, |legacyFactoryFunction|).
1. Perform [$DefineMethodProperty$](|target|, |id|, |legacyFactoryFunction|, <emu-val>false</emu-val>).
1. [=list/iterate|For every=] [=callback interface=] |interface| that is [=exposed=] in
|realm| and on which [=constants=] are defined:
1. Let |id| be |interface|'s [=identifier=].
1. Let |interfaceObject| be the result of [=create a legacy callback interface
object|creating a legacy callback interface object=] for |interface| with |id| in |realm|.
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, <emu-val>false</emu-val>).
1. [=list/iterate|For every=] [=namespace=] |namespace| that is [=exposed=] in
|realm|:
1. Let |id| be |namespace|'s [=identifier=].
1. Let |namespaceObject| be the result of [=create a namespace object|creating a namespace object=] for |namespace| in |realm|.
1. Perform [$CreateMethodProperty$](|target|, |id|, |namespaceObject|).
1. Perform [$DefineMethodProperty$](|target|, |id|, |namespaceObject|, <emu-val>false</emu-val>).
</div>

<div class="note">
Expand Down Expand Up @@ -14443,7 +14443,7 @@ The characteristics of a namespace object are described in [[#namespace-object]]
1. Let |id| be |interface|'s [=identifier=].
1. Let |interfaceObject| be the result of [=create an interface object|creating an
interface object=] for |interface| with |id| in |realm|.
1. Perform [$CreateMethodProperty$](|namespaceObject|, |id|, |interfaceObject|).
1. Perform [$DefineMethodProperty$](|namespaceObject|, |id|, |interfaceObject|, <emu-val>false</emu-val>).
1. Return |namespaceObject|.
</div>

Expand Down
Loading