closure-compiler
closure-compiler copied to clipboard
Native Array.from and polyfilled Set on Firefox 32-36 without Symbol.iterator support
Current Set conformance check forces polyfill for Set, but will keep original Array.from in Firefox 32-36. These versions use set["@@iterator"] instead of set[Symbol.iterator] which leads to Array.from(new Set("a")) to be [], although native implementation would return correct result.
I don't know whether
- Whether it is a concern at all (I think it is even that Firefox 32-36 quite rare they have better feature set than IE11 and probably shouldn't have broken experience)
- We should expose
@@iteratorinSetpolyfill - We should lookup
@@iteratorinArray.from - Other options I haven't thought of
I assume that this can affect other collections and methods that expect iterator.
I would expect the polyfill for Set to pull-in Symbol.iterator since it has 'require es6/symbol';. But, Firefox < 36 does not support Symbol.iterator.
What language level output are you using? That version of Firefox may not support it.
I think language_out it is ECMASCRIPT5