summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-06-14 20:06:34 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-06-14 20:06:34 +0200
commit6318f4b9d8233330e705392d09422299ec1a4ef9 (patch)
tree6971f88bd2ef4f062ede7984609660e9c55bea44
parent8d71dfe26e9f1cfb5a7043555364fe39982fddd5 (diff)
Fix how elm gets embeddedfix-embedding
-rw-r--r--README.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/README.md b/README.md
index 1ee1221..051ad47 100644
--- a/README.md
+++ b/README.md
@@ -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.