Re: [heycam/webidl] Normative: Match ECMA‑262 function property enumeration order (#914)

@Ms2ger approved this pull request.

Looks good as far as the spec goes, but each of these calls needs to be tested. The values are probably mostly covered by idlharness, but the order of iteration probably isn't.

> +    1.  Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, 0, |name|, « », |realm|, {{%Function.prototype%}}, "<code>get</code>").
     1.  Return |F|.

```suggestion
    1.  Return [=!=] [$CreateBuiltinFunction$](|steps|, 0, |name|, « », |realm|, {{%Function.prototype%}}, "<code>get</code>").
```

> +    1.  Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, 1, |name|, « », |realm|, {{%Function.prototype%}}, "<code>set</code>").
     1. Return |F|.

```suggestion
    1.  Return [=!=] [$CreateBuiltinFunction$](|steps|, 1, |name|, « », |realm|, {{%Function.prototype%}}, "<code>set</code>").
```

> +    1.  Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, |length|, |id|, « », |realm|).
     1.  Return |F|.

```suggestion
    1.  Return [=!=] [$CreateBuiltinFunction$](|steps|, |length|, |id|, « », |realm|).
```

> @@ -12748,7 +12722,7 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
 
     1.  If |ongoingPromise| is not null, then:
         1.  Let |afterOngoingPromiseCapability| be [=!=] [$NewPromiseCapability$]({{%Promise%}}).
-        1.  Let |onSettled| be [=!=] [$CreateBuiltinFunction$](|nextSteps|, « »).
+        1.  Let |onSettled| be [=!=] [$CreateBuiltinFunction$](|nextSteps|, 0, "", « »).

Are these observable? Should the length be one like the others?

-- 
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/914#pullrequestreview-688307418

Received on Monday, 21 June 2021 11:26:46 UTC