Skip to content

Commit 5a2802b

Browse files
authored
Editorial: replace CreateMethodProperty with DefineMethodProperty
Aligns with JavaScript which no longer defines CreateMethodProperty. Fixes #1389.
1 parent 400ce04 commit 5a2802b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

index.bs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12328,8 +12328,8 @@ then there must exist a property with the following characteristics:
1232812328
of [=interface=] |definition| on |target|, given [=realm=] |realm|, run the following steps:
1232912329

1233012330
1. If |definition| has an [=indexed property getter=], then:
12331-
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}},
12332-
{{%Array.prototype.values%}}).
12331+
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}},
12332+
{{%Array.prototype.values%}}, false).
1233312333
1. If |definition| has a [=value iterator=], then:
1233412334
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>",
1233512335
{{%Array.prototype.entries%}}).
@@ -12354,7 +12354,7 @@ then there must exist a property with the following characteristics:
1235412354
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1235512355
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1235612356
1. Perform [$SetFunctionLength$](|F|, 0).
12357-
1. Perform [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|).
12357+
1. Perform [$DefineMethodProperty$](|target|, {{@@iterator}}, |F|, false).
1235812358
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1235912359
1. Define the <code class="idl">keys</code> method:
1236012360
1. Let |steps| be the following series of steps:
@@ -12546,7 +12546,7 @@ and the string "<code> Iterator</code>".
1254612546
1. Let |F| be [$CreateBuiltinFunction$](|steps|, « », |realm|).
1254712547
1. Perform [$SetFunctionName$](|F|, "<code>entries</code>").
1254812548
1. Perform [$SetFunctionLength$](|F|, 0).
12549-
1. Perform [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
12549+
1. Perform [$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, false).
1255012550
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>entries</code>", |F|).
1255112551
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
1255212552
<code class="idl">keys</code> method:
@@ -12596,7 +12596,7 @@ and the string "<code> Iterator</code>".
1259612596
1. Perform [$SetFunctionLength$](|F|, 0).
1259712597
1. Perform [=!=] [$CreateDataPropertyOrThrow$](|target|, "<code>values</code>", |F|).
1259812598
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
12599-
[$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
12599+
[$DefineMethodProperty$](|target|, {{@@asyncIterator}}, |F|, false).
1260012600
</div>
1260112601

1260212602
<div algorithm>
@@ -13508,31 +13508,31 @@ the realm given as an argument.
1350813508
1. Let |id| be |interface|'s [=identifier=].
1350913509
1. Let |interfaceObject| be the result of [=create an interface object|creating
1351013510
an interface object=] for |interface| with |id| in |realm|.
13511-
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
13511+
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, false).
1351213512
1. If the |interface| is declared with a [{{LegacyWindowAlias}}] [=extended attribute=],
1351313513
and |target| implements the {{Window}} [=interface=], then:
1351413514
1. [=list/iterate|For every=] [=LegacyWindowAlias identifier|identifier=] |id| in
1351513515
[{{LegacyWindowAlias}}]'s [=LegacyWindowAlias identifier|identifiers=]:
13516-
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
13516+
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, false).
1351713517
1. If the |interface| is declared with a [{{LegacyFactoryFunction}}] [=extended attribute=],
1351813518
then:
1351913519
1. [=list/iterate|For every=] [=LegacyFactoryFunction identifier|identifier=] |id| in
1352013520
[{{LegacyFactoryFunction}}]'s [=LegacyFactoryFunction identifier|identifiers=]:
1352113521
1. Let |legacyFactoryFunction| be the result of
1352213522
[=create a legacy factory function|creating a legacy factory function=] with
1352313523
|id| for |interface| in |realm|.
13524-
1. Perform [$CreateMethodProperty$](|target|, |id|, |legacyFactoryFunction|).
13524+
1. Perform [$DefineMethodProperty$](|target|, |id|, |legacyFactoryFunction|, false).
1352513525
1. [=list/iterate|For every=] [=callback interface=] |interface| that is [=exposed=] in
1352613526
|realm| and on which [=constants=] are defined:
1352713527
1. Let |id| be |interface|'s [=identifier=].
1352813528
1. Let |interfaceObject| be the result of [=create a legacy callback interface
1352913529
object|creating a legacy callback interface object=] for |interface| with |id| in |realm|.
13530-
1. Perform [$CreateMethodProperty$](|target|, |id|, |interfaceObject|).
13530+
1. Perform [$DefineMethodProperty$](|target|, |id|, |interfaceObject|, false).
1353113531
1. [=list/iterate|For every=] [=namespace=] |namespace| that is [=exposed=] in
1353213532
|realm|:
1353313533
1. Let |id| be |namespace|'s [=identifier=].
1353413534
1. Let |namespaceObject| be the result of [=create a namespace object|creating a namespace object=] for |namespace| in |realm|.
13535-
1. Perform [$CreateMethodProperty$](|target|, |id|, |namespaceObject|).
13535+
1. Perform [$DefineMethodProperty$](|target|, |id|, |namespaceObject|, false).
1353613536
</div>
1353713537

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

0 commit comments

Comments
 (0)