From 5e722af04aabe963ebd9eef8a5deddb1b5d8f5eb Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 24 Apr 2020 19:57:07 -0400 Subject: [PATCH] Editorial: Return an iterator *record* for for...in heads (#1969) --- spec.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec.html b/spec.html index 3892134a82..e69d5eb6d7 100644 --- a/spec.html +++ b/spec.html @@ -17923,7 +17923,9 @@

Runtime Semantics: ForIn/OfHeadEvaluation ( _uninitializedBoundNames_, _expr 1. If _exprValue_ is *undefined* or *null*, then 1. Return Completion { [[Type]]: ~break~, [[Value]]: ~empty~, [[Target]]: ~empty~ }. 1. Let _obj_ be ! ToObject(_exprValue_). - 1. Return ? EnumerateObjectProperties(_obj_). + 1. Let _iterator_ be ? EnumerateObjectProperties(_obj_). + 1. Let _nextMethod_ be ! GetV(_iterator_, *"next"*). + 1. Return the Record { [[Iterator]]: _iterator_, [[NextMethod]]: _nextMethod_, [[Done]]: *false* }. 1. Else, 1. Assert: _iterationKind_ is ~iterate~ or ~async-iterate~. 1. If _iterationKind_ is ~async-iterate~, let _iteratorHint_ be ~async~.