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

Iterating over the registry #17

Closed
matthewp opened this issue Feb 10, 2015 · 6 comments
Closed

Iterating over the registry #17

matthewp opened this issue Feb 10, 2015 · 6 comments

Comments

@matthewp
Copy link

In this comment @dherman you mentioned that to share registries between loaders you could simply copy over the entries. I agree that this is a good natural way to share. However to do that you would need to be able to iterate over the entries. What do you think about having the Loader implement @@iterator so that this can be done?

@dherman
Copy link

dherman commented Feb 15, 2015

Yes we will need a way to iterate. It's on my todo list. I'll leave this issue open till it's specified. Thanks!

@EisenbergEffect
Copy link

👍

@caridy
Copy link
Contributor

caridy commented Aug 21, 2015

Solved by #65.

for (let entry of System.loader.registry) {
    ...
})

@EisenbergEffect
Copy link

Excellent. Your work is appreciated 😄

@matthewp
Copy link
Author

Thanks @caridy !

@caridy
Copy link
Contributor

caridy commented Aug 21, 2015

https://whatwg.github.io/loader/#registry-prototype-@@iterator, while GetRegistryEntry defines what will be accesible thru the iteration.

Note: since registry is not an iterator, it implements @@iterator, you might get into racing conditions.

@caridy caridy closed this as completed Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants