Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for iterables in dom-repeat #800

Closed
RB14 opened this issue Oct 15, 2014 · 7 comments
Closed

Add support for iterables in dom-repeat #800

RB14 opened this issue Oct 15, 2014 · 7 comments

Comments

@RB14
Copy link

RB14 commented Oct 15, 2014

It might be still early, but I'm really excited about iterators\iterables landing in Chrome 38, that I'd really like to make use of them in my templates. Chrome 39 will come with Generators support which should really allow iterables to be more memory friendly when creating a large generator, and when chaining them inside a filter.

I think it should be implemented in Polymer (or should I say MDV?), but maybe , in the lack of an appropriate polyfill for Symbol.iterator (which should be easily implemented in platform.js if necessary), or for Generators (which may be harder), it should come with a warning for an experimental technology or the likes. This will allow developers who target the Chrome\Firefox platforms, to make use of them right away.

@lgersman
Copy link

lgersman commented Nov 4, 2014

👍

@tjsavage tjsavage added the 0.5 label May 21, 2015
@tjsavage
Copy link
Contributor

Closing this issue due to age and the release of version 1 of Polymer - please feel free to re-open if this is incorrect.

@justinfagnani justinfagnani changed the title Adding support for iterables in <template repeat> Add support for iterables in dom-repeat Oct 27, 2015
@justinfagnani
Copy link
Contributor

Re-opening and cleaning up for 1.0

@justinfagnani
Copy link
Contributor

Symbol.iterator is supported Chrome, FF, IE Edge 12 and Safari 9. It's possible to polyfill, though polyfilling the places where it's used is a little trickier. IE 11 and Safari Maps aren't iterable for example.

Presumably someone using this feature has their own browser support requirements and can live with that or load the needed polyfills themselves. Then dom-repeat could just check if items[Symbol.iterator] exists and use that.

@jogibear9988
Copy link

jogibear9988 commented Nov 19, 2017

In 2.0 still only array is supported!
As now a compile to ES5 is needed because polymer also uses ES6 can't we just use a "for of" loop if "items" it's not an array?

@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2020
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants