-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[WIP] dynamic-import importHref()
callback fix when the same resource is requested multiple times
#4114
Conversation
92ebfd0
to
977a93a
Compare
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
fe43d65
to
3f30a44
Compare
CLAs look good, thanks! |
importHref()
callback fix when the same resource is requested multiple times
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.
Would you mind addressing the feedback and updating the PR so it can be merged cleanly? Thanks for the PR!
var imprt = Polymer.Base.importHref(url); | ||
|
||
var onLoad = function() { | ||
document.removeEventListener('load', onLoad); |
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.
document
here should be imprt
@@ -0,0 +1,24 @@ | |||
<!DOCTYPE html> |
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.
Please remove if this file is not used anywhere.
@sorvell thanks for the review. all done! |
oh this would have also fixed #4124 |
e3e408a
to
6cc2451
Compare
6cc2451
to
3eb6336
Compare
3eb6336
to
9146ec2
Compare
118fc39
to
a2c4e33
Compare
importHref()
callback fix when the same resource is requested multiple timesimportHref()
callback fix when the same resource is requested multiple times
addresses Polymer#3814
a2c4e33
to
eade3d2
Compare
247e88a
to
1fec33b
Compare
Closing in favor of #4209 |
fixes #3814
The expected behavior of
importHref()
is that onload or onerror get called once the resource is loaded.When requesting a resource for the second time, we can immediately call the onload or onerror function in case it was already completed. Otherwise we attach to the same events as the previous request.
Unit Test