Skip to content

Instantly share code, notes, and snippets.

@w0rm
Created February 9, 2016 23:00
Show Gist options
  • Save w0rm/bd07d5a01fbe035b6273 to your computer and use it in GitHub Desktop.
Save w0rm/bd07d5a01fbe035b6273 to your computer and use it in GitHub Desktop.
Trigger elm-reactor build before loading elm.js
<script>
var img = new Image();
img.onerror = function () {
var script = document.createElement('script');
script.src = 'elm.js';
script.onload = function () {
Elm.fullscreen(Elm.Main, {
locationHash: window.location.hash,
windowDimensions: [window.innerWidth, window.innerHeight]
})
}
document.documentElement.appendChild(script);
}
img.src = 'Main.elm';
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment