Created
November 22, 2015 03:57
-
-
Save wanderview/ce1ab086564063fa61d3 to your computer and use it in GitHub Desktop.
data URI baseURL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script> | |
var s = document.createElement('script'); | |
s.src = 'data:text/javascript,console.log("data URI baseURI: " + document.currentScript.baseURI);' | |
document.body.appendChild(s); | |
console.log('### ### script with ' + s.src); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment