Nicer API for embedding Elm programs

This commit is contained in:
Evan Czaplicki 2013-08-29 17:38:37 -07:00
parent 6ba2d70365
commit 1a45cb5eca

View file

@ -13,7 +13,7 @@ Elm.fullscreen = function(module) {
return init(ElmRuntime.Display.FULLSCREEN, container, module);
};
Elm.domNode = function(container, module) {
Elm.embed = function(module, container) {
var tag = container.tagName;
if (tag !== 'DIV') {
throw new Error('Elm.node must be given a DIV, not a ' + tag + '.');