Build environment: macOS 26.5.2
Moddable SDK version:
- Installed via jsvu, so there is no SDK source tree /
git describe.
- Engine reports:
XS 17.9.1, slot 32 bytes, ID 4 bytes
Target device: desktop (host xs)
Description
The next method of %StringIteratorPrototype%, %MapIteratorPrototype% and %SetIteratorPrototype% is created as a non-configurable property.
Unless its own definition states otherwise, a built-in data property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. %StringIteratorPrototype%.next, %MapIteratorPrototype%.next and %SetIteratorPrototype%.next state no attributes of their own, so the default applies and all three must be configurable.
Steps to Reproduce
$ xst -e 'print(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(""[Symbol.iterator]()), "next").configurable)'
false
Expected behavior
true.
For comparison, V8 (15.4.18):
$ v8 -e 'print(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(""[Symbol.iterator]()), "next").configurable)'
true
Other information
The Map and Set iterator prototypes behave the same way:
$ xst -e 'print(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(new Map()[Symbol.iterator]()), "next").configurable)'
false
$ xst -e 'print(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(new Set()[Symbol.iterator]()), "next").configurable)'
false
The remaining iterator prototypes are correct. %ArrayIteratorPrototype%, %RegExpStringIteratorPrototype%, %GeneratorPrototype%, %IteratorHelperPrototype% and %WrapForValidIteratorPrototype% all report configurable: true, so only these three differ.
Build environment: macOS 26.5.2
Moddable SDK version:
git describe.XS 17.9.1, slot 32 bytes, ID 4 bytesTarget device: desktop (host
xs)Description
The
nextmethod of%StringIteratorPrototype%,%MapIteratorPrototype%and%SetIteratorPrototype%is created as a non-configurable property.Unless its own definition states otherwise, a built-in data property has the attributes
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }.%StringIteratorPrototype%.next,%MapIteratorPrototype%.nextand%SetIteratorPrototype%.nextstate no attributes of their own, so the default applies and all three must be configurable.Steps to Reproduce
Expected behavior
true.For comparison, V8 (15.4.18):
Other information
The Map and Set iterator prototypes behave the same way:
The remaining iterator prototypes are correct.
%ArrayIteratorPrototype%,%RegExpStringIteratorPrototype%,%GeneratorPrototype%,%IteratorHelperPrototype%and%WrapForValidIteratorPrototype%all reportconfigurable: true, so only these three differ.