diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-06-14 20:06:34 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-06-14 20:06:34 +0200 |
commit | 6318f4b9d8233330e705392d09422299ec1a4ef9 (patch) | |
tree | 6971f88bd2ef4f062ede7984609660e9c55bea44 | |
parent | 8d71dfe26e9f1cfb5a7043555364fe39982fddd5 (diff) |
Fix how elm gets embeddedfix-embedding
-rw-r--r-- | README.md | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -178,14 +178,15 @@ Edit the index.html file to import the new bundle.js file and embed it into a di <script src="bundle.js"></script> <script> var Elm = require('./bundle.js'); - var container = document.getElementById('container'); - var app = Elm.Main.embed(container); + var app = Elm.Elm.Main.init({ + node: document.getElementById('container') + }); </script> </html> ``` Here you are grabbing the container div and embedding the javascript code in there. Elm automatically -creates the Main.embed function during compilation. +creates the Main.init function during compilation. A few more housekeeping items before we see this in action. |