Skip to content

Instantly share code, notes, and snippets.

@wanderview
Created November 22, 2015 03:57
Show Gist options
  • Save wanderview/ce1ab086564063fa61d3 to your computer and use it in GitHub Desktop.
Save wanderview/ce1ab086564063fa61d3 to your computer and use it in GitHub Desktop.
data URI baseURL
<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