on master help sign in
don't bother with a message for Platform.worker
6173f08Evan Czaplicki
compiler/src/Generate/Html.hs+4−8
@@ -29,20 +29,16 @@ sandwich moduleName javascript =
29
29
30<body>
30<body>
31
31
32−<pre id="elm">
32+<pre id="elm"></pre>
33−This is a headless program, meaning there is nothing to show here.
34−
35−I started the program anyway though!
36−
37−You can access it as `app` in the developer console.
38−</pre>
39
33
40<script>
34<script>
41try {
35try {
42|] <> javascript <> [r|
36|] <> javascript <> [r|
43
37
44 var app = Elm.|] <> name <> [r|.init({ node: document.getElementById("elm") });
38 var app = Elm.|] <> name <> [r|.init({ node: document.getElementById("elm") });
39+}
45−} catch (e) {
40+catch (e)
41+{
46 // display initialization errors (e.g. bad flags, infinite recursion)
42 // display initialization errors (e.g. bad flags, infinite recursion)
47 var header = document.createElement("h1");
43 var header = document.createElement("h1");
48 header.style.fontFamily = "monospace";
44 header.style.fontFamily = "monospace";