Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// Creates the script tag
var tag = document.createElement('script');
// Calls the API javascript
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment