@@ -24,18 +24,30 @@ sandwich moduleName javascript =
25 <meta charset="UTF-8">
25 <meta charset="UTF-8">
26 <title>|] <> name <> [r|</title>
26 <title>|] <> name <> [r|</title>
27+ <style>body { padding: 0; margin: 0; }</style>
30−<div id="elm-df98db9626"></div>
31+
33+This is a headless program, meaning there is nothing to show here.
35+I started the program anyway though!
37+You can access it as `app` in the developer console.
32|] <> javascript <> [r|
41|] <> javascript <> [r|
34−var app = Elm.|] <> name <> [r|.init({ node: document.getElementById("elm-df98db9626") });
44+ var app = Elm.|] <> name <> [r|.init({ node: document.getElementById("elm") });
35−if (document.getElementById("elm-df98db9626"))
45+} catch (e) {
36−{
46+ // display initialization errors (e.g. bad flags, infinite recursion)
37− document.getElementById("elm-df98db9626").innerText = 'This is a headless program, meaning there is nothing to show here.\n\nI started the program anyway though, and you can access it as `app` in the developer console.';
47+ document.getElementById("elm").innerText = e;