Skip to content

Instantly share code, notes, and snippets.

@getify
Created July 20, 2010 15:12
Show Gist options
  • Select an option

  • Save getify/483080 to your computer and use it in GitHub Desktop.

Select an option

Save getify/483080 to your computer and use it in GitHub Desktop.
<script src="data:text/javascript,alert('hello world');"></script>
<script>alert("hello world");</script>
@getify
Copy link
Copy Markdown
Author

getify commented Jul 20, 2010

mathias -- @fearphage pointed out that, for browsers that support script data-uris, the load/error events would fire, whereas not with inline script blocks. this might have a limited use in the context of using "defer" on script tags.

@mathiasbynens
Copy link
Copy Markdown

That’s good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment