Re: [heycam/webidl] Editorial: make more iterator-related stuff imperative (#862)

@annevk approved this pull request.



> +    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}},
+            {{%ArrayProto_values%}}).
+        1.  If |definition| has a [=value iterator=], then:
+            1.  Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>",
+                {{%ArrayProto_entries%}}).
+            1.  Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>",
+                {{%ArrayProto_keys%}}).
+            1.  Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>",
+                {{%ArrayProto_values%}}).
+            1.  Perform [=!=] [$CreateDataProperty$](|target|, "<code>forEach</code>",
+                {{%ArrayProto_forEach%}}).
+    1.  Otherwise, if |definition| has a [=pair iterator=], then:
+        1.  Define the {{@@iterator}} and <code class="idl">entries</code> methods:

I find this informative style a little weird, but I guess it's clear enough.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/862#pullrequestreview-381917214

Received on Thursday, 26 March 2020 11:27:01 UTC