on master help sign in
Change API for embedding Elm modules
1207e2fEvan Czaplicki
runtime/Init.js+1−1
@@ -13,7 +13,7 @@ Elm.fullscreen = function(module) {
13 return init(ElmRuntime.Display.FULLSCREEN, container, module);
13 return init(ElmRuntime.Display.FULLSCREEN, container, module);
14};
14};
15
15
16−Elm.domNode = function(container, module) {
16+Elm.embed = function(module, container) {
17 var tag = container.tagName;
17 var tag = container.tagName;
18 if (tag !== 'DIV') {
18 if (tag !== 'DIV') {
19 throw new Error('Elm.node must be given a DIV, not a ' + tag + '.');
19 throw new Error('Elm.node must be given a DIV, not a ' + tag + '.');