Closed Bug 1083470 Opened 11 years ago Closed 8 years ago

Disable SpiderMonkey support for E4X for-each

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

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.
This one is super-useful. I'd rather have it standardized, in a slightly improved form that allows custom classes to easily be iterated.
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
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Keywords: site-compat
Depends on: 1171509
Depends on: 1171586
Depends on: 1172536
Depends on: 1215965
Depends on: 1216775
Depends on: 1217038
Depends on: 1217072
Depends on: 1217077
Depends on: 1217082
Depends on: 1217093
Depends on: 1217315
Depends on: 1217316
Depends on: 1217318
Depends on: 1217422
Depends on: 1217423