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

Created on 12 May 2015  路  25Comments  路  Source: Fyrd/caniuse

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.

GM import Support data suggestion

Most helpful comment

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

All 25 comments

+1

+1

+1

+1

+1 :+1:

See https://html.spec.whatwg.org/multipage/dom.html#dom-document-currentscript for documentation.

+1

+1

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

Alas ...

+1

+1

+1

+1

+1

+1

+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.

+1

+1

+1

+1

+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. :)

+1

+1

+1

+1

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhartoft picture mhartoft  路  3Comments

Schweinepriester picture Schweinepriester  路  3Comments

rowbot-weisguy picture rowbot-weisguy  路  3Comments

dnknn picture dnknn  路  3Comments

myfonj picture myfonj  路  3Comments