Contact emails
Spec
http://heycam.github.io/webidl/#es-iterators
Summary
This is a small WebIDL bindings feature, which adds a property named Symbol.iterator, with value %ArrayProto_values%[1], to any WebIDL interface with an integer-typed "length" attribute, and an indexed property getter.
This was originally implemented back in October, 2015, in https://codereview.chromium.org/1381413003, behind the RuntimeEnabledFlag "IterableCollections".
Removing this flag exposes the Symbol.iterator on the following interfaces:
CSSRuleList, CSSStyleDeclaration, ClientRectList, DOMStringList, DataTransferItemList,
FileList, HTMLAllCollection, HTMLCollection, HTMLFormElement, HTMLOptionsCollection,
HTMLSelectElement, MediaList, MimeTypeArray, NamedNodeMap, Plugin, PluginArray,
SVGLengthList, SVGNumberList, SVGPointList, SVGStringList, SVGTransformList,
SourceBufferList, Storage, StyleSheetList, TextTrackCueList, TextTrackList, TouchList,
webkitSpeechGrammarList
In addition, it also exposes Symbol.iterator, and methods "forEach", "values", "keys", and "entries", on NodeList. These methods behave
similarly to how they do on ECMAScript Array objects.
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Interoperability and Compatibility Risk
This change is largely compatible with the implementation in Firefox 48 --- One exception is that Symbol.iterator is currently installed on Window, but a spec change has since made this invalid. The property being inserted on Window is in the process of being removed (and would be removed automatically if the indexed property getter were removed from Window, as it has been removed in the spec[2].
OWP launch tracking bug
This is currently being tracked at crbug.com/538558[3].
Entry on the feature dashboard
There currently is none, as this is a very small feature, and very low cost, and is primarily implemented to enable a simple convention introduced in ECMAScript 6, rather than to enable some new exciting feature.
lgtm1
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.