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

Gets the correct address for the current script on browsers #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dtracers
Copy link

@dtracers dtracers commented Jul 4, 2017

The old way breaks if you load the script using html imports

Then the url is pointing at an invalid script.

The old way breaks if you load the script using html imports

Then the url is pointing at an invalid script.
@dtracers
Copy link
Author

dtracers commented Jul 4, 2017

Note:
I do not currently have access to IE 11 so i have not been been able to test it in a browser that does not have currentscript as a field

http://caniuse.com/#search=currentScript

.split('/')
.slice(0, -1)
.join('/')+'/';
if (doucment.currentScript) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like a typo, would be a good idea to create a test to catch these things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants