Skip to content

Instantly share code, notes, and snippets.

@jeremenichelli
Created February 13, 2015 19:42
Show Gist options
  • Save jeremenichelli/8ce79f331258209da7cf to your computer and use it in GitHub Desktop.
Save jeremenichelli/8ce79f331258209da7cf to your computer and use it in GitHub Desktop.
Use IIFE to retrieve head tag when executed
document.head = (function(d) {
return d.head || d.getElementsByTagName('head')[0];
})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment