Put script tag in head.

This commit is contained in:
Dillon Kearns 2019-07-23 15:16:04 -07:00
parent 65566f02a4
commit 8876184dc5
3 changed files with 8 additions and 6 deletions

View File

@ -1,5 +0,0 @@
import { Elm } from "./Main.elm";
Elm.Main.init({
node: document.getElementById("app")
});

View File

@ -3,10 +3,10 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>elm-markup-pages</title> <title>elm-markup-pages</title>
<script src="./js/app.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="./app.js"></script>
</body> </body>
</html> </html>

7
site/src/js/app.js Normal file
View File

@ -0,0 +1,7 @@
import { Elm } from "../Main.elm";
document.addEventListener("DOMContentLoaded", function() {
Elm.Main.init({
node: document.getElementById("app")
});
});