-
Notifications
You must be signed in to change notification settings - Fork 15
setting loading promise on request (not on load) to avoid duplicate l… #29
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
Conversation
…oadings before load were finished
…dded load and error events
@vgavro Thank you for the pull request! I will need some time before I can get to reviewing it however, please understand. However it is now on my TODO list and is very much appreciated! |
@taoeffect has this moved up on your TODO list? |
@g3rd Yes, thank you for the reminder! There are still some items that require my immediate attention first. If this is an urgent issue for you, I recommend simply creating a file in your project that has all of the code from this project copy/pasted into it, along with the changes here. This is not a project that I expect to have a rapid development cycle, so you won't be missing much, and you can always check back from time to time to see if these changes were merged back in. (Plus, you'll be slightly more secure because you won't be relying on npm! 😄) |
() => this.$emit('load'), | ||
(err) => this.$emit('error', err) | ||
) | ||
!this.async |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _.isUndefined
check was necessary because <script async ..
means the same thing as <script async=true
. So we must check for both whether it's undefined, and whether async="false"
is set, per https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
I've merged this and will fix the issues I found in it. Thank you for your PR and my apologies for the time it's taken me to get back to this! |
Published 2.1.0! Note that |
closes #12
Setting loading promise on request (not on load) to avoid duplicate loadings before load were finished
See #12 (comment)
PROPOSAL (backward incompatible): rename Script2.loaded to Script2.load because we also store promises which is still in progress. What do you think?
Also: