Closed
Bug 1083470
Opened 11 years ago
Closed 8 years ago
Disable SpiderMonkey support for E4X for-each
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: cpeterson, Assigned: emk)
References
(Blocks 2 open bugs)
Details
(Keywords: dev-doc-complete, site-compat, Whiteboard: [DocArea=JS])
Attachments
(2 files)
No description provided.
Comment 1•11 years ago
|
||
This one is super-useful. I'd rather have it standardized, in a slightly improved form that allows custom classes to easily be iterated.
Comment 2•11 years ago
|
||
A slightly different form, |for (val of obj)|, got standardized. To use it you define obj[@@iterator] as a function that returns an iterator object yielding values that are bound in sequence to val.
@@iterator is -- very shortly -- going to be Symbol.iterator. Right now it's just "@@iterator", I think, as a temporary hack. So enabling symbol support in releases, and making Symbol.iterator work, are prerequisites to using for-of on objects other than those that we've already made iterable. Arrays are the most common already-iterable object right now.
Depends on: 918828
Updated•11 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Updated•11 years ago
|
Keywords: site-compat
Updated•10 years ago
|
Description
•