diff --git a/spec.html b/spec.html index 1cfb5fb6b5..2b0d166ed5 100644 --- a/spec.html +++ b/spec.html @@ -8639,7 +8639,15 @@

[[Enumerate]] ()

1. Return ? _target_.[[Enumerate]](). 1. Let _trapResult_ be ? Call(_trap_, _handler_, « _target_ »). 1. If Type(_trapResult_) is not Object, throw a *TypeError* exception. - 1. Return _trapResult_. + 1. Let _array_ be ArrayCreate(0). + 1. Let _nextIndex_ be 0. + 1. Repeat + 1. Let _next_ be ? IteratorStep(_trapResult_). + 1. If _next_ is *false*, return CreateArrayIterator(_array_, `"value"`). + 1. Let _nextValue_ be ? IteratorValue(_next_). + 1. If Type(_nextValue_) is not String, throw a *TypeError* exception. + 1. Perform ! CreateDataPropertyOrThrow(_array_, ToString(ToUint32(_nextIndex_)), _nextValue_). + 1. Let _nextIndex_ be _nextIndex_ + 1.

[[Enumerate]] for proxy objects enforces the following invariants: