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

document.currentScript is useful for scripts which need to be aware of where their script tag is in ... #1099

Closed
Fyrd opened this issue May 12, 2015 · 25 comments

Comments

@Fyrd
Copy link
Owner

Fyrd commented May 12, 2015

document.currentScript is useful for scripts which need to be aware of where their script tag is in relation to the rest of the DOM, such as when a script needs to operate only on its sibling elements.


This issue was imported from Google Moderator

Moderator votes: +16
Issue added by danhunsaker on 2014-06-03
To vote this issue up or down, simply include +1 or -1 in your comment.

@Jamtis
Copy link

Jamtis commented Jul 24, 2015

+1

3 similar comments
@Bartvds
Copy link

Bartvds commented Sep 17, 2015

+1

@itsrachelfish
Copy link

+1

@TremayneChrist
Copy link
Contributor

+1

@gagern
Copy link

gagern commented Nov 4, 2015

@staio
Copy link

staio commented Nov 9, 2015

+1

1 similar comment
@Jakobud
Copy link

Jakobud commented Dec 31, 2015

+1

@BobStein
Copy link

+1 - PDF.js crashes on document.currentScript in IE11. So: http://caniuse.com/#search=currentScript

Alas ...

@anymos
Copy link

anymos commented Jan 21, 2016

+1

5 similar comments
@micromaomao
Copy link

+1

@elhaard
Copy link

elhaard commented Feb 1, 2016

+1

@d-ark
Copy link

d-ark commented Feb 3, 2016

+1

@ak5
Copy link

ak5 commented Mar 1, 2016

+1

@forberg
Copy link

forberg commented Mar 17, 2016

+1

@Stephan972
Copy link

+1

MDC lists the browsers supporting document.currentScript.
See: https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript

As of this writing, IE doesn't support this feature. Support is unknown for IE Mobile and Opera Mobile.

@alexanderdickson
Copy link

+1

3 similar comments
@mjhm
Copy link

mjhm commented Mar 24, 2016

+1

@enterprisey
Copy link

+1

@mkdgs
Copy link

mkdgs commented Mar 25, 2016

+1

@bvibber
Copy link

bvibber commented Mar 27, 2016

+1 note this is implemented in Microsoft Edge at least as of Windows Insider build 14295 (haven't tested release builds). Would be nice to list this sort of thing. :)

@stuartpb
Copy link
Contributor

stuartpb commented Apr 1, 2016

+1

3 similar comments
@TakayoshiKochi
Copy link

+1

@louislepper
Copy link

+1

@WhiteWind
Copy link

+1

@Fyrd
Copy link
Owner Author

Fyrd commented Apr 18, 2016

Now available at http://caniuse.com/#feat=document-currentscript

@Fyrd Fyrd closed this as completed Apr 18, 2016
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