Last active
January 30, 2017 20:47
-
-
Save jhrcek/2b9a9990197c29eef75269d537f94fbb to your computer and use it in GitHub Desktop.
Include elm-generated JS on 3rd party web page
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
javascript:(function() { | |
var elmDiv = document.createElement("div"); | |
elmDiv.id="elm"; | |
var elmJs = document.createElement("script"); | |
elmJs.src="//bit.ly/2eMDpH9"; | |
elmJs.onload=function() { | |
var node = document.getElementById('elm'); | |
Elm.Main.embed(node); | |
}; | |
document.body.appendChild(elmDiv); | |
document.body.appendChild(elmJs); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment