GlenDC / trixel

An easy to use webtool, to make trixel art.
http://www.glendc.com/trixel/
MIT License
18 stars 0 forks source link

App Script Loading doesn't wait for DOM to be ready #18

Closed GlenDC closed 9 years ago

GlenDC commented 9 years ago

Right now we're automatically generating the final index.html via the elm-make utility. We should instead compile to a JavaScript file containing all our logic. This way we can have a custom function and only invoke the main Elm function, once the body is loaded. Such a thing should be trivial thanks to the onload Event.

This would allow us to load it up as follows: <body onload="Elm.fullscreen(Elm.Trixel.Main)">

By doing this we could also start adding constant html info such as a title, icon, tags and any other relevant information.

Perhaps it would be a good idea to, when we fix this issue, to create a simple pipeline that would generate a minified html version with the output JavaScript logic minified as well.

GlenDC commented 9 years ago

Fixed in 1.4