on master help sign in
Bug fixes from the Init.js refactor that just happened.
commitcb154acc537a3a3c2be1db7031650e6a81c54a23 authorevancz <info@elm-lang.org> dateThu 30 May 2013, 18:52 (13 years ago) parent6ddb826
1 file changed+3−3
runtime/Init.js+3−3
runtime/Init.js+3−3
@@ -89,21 +89,21 @@ function initGraphics(elm, Module) {
8989 var signalGraph = Module.main;
9090
9191 // make sure the signal graph is actually a signal & extract the visual model
92+ var Signal = Elm.Signal(elm);
9293 if (!('recv' in signalGraph)) {
93− var Signal = Elm.Signal(elm);
9494 signalGraph = Signal.constant(signalGraph);
9595 }
9696 var currentScene = signalGraph.value;
9797
9898 // Add the currentScene to the DOM
9999 var Render = ElmRuntime.use(ElmRuntime.Render.Element);
100− container.appendChild(Render.render(currentScene));
100+ elm.node.appendChild(Render.render(currentScene));
101101 if (elm.Native.Window) elm.Native.Window.resizeIfNeeded();
102102
103103 // set up updates so that the DOM is adjusted as necessary.
104104 function domUpdate(newScene) {
105105 ElmRuntime.draw(function(_) {
106− Render.update(container.firstChild, currentScene, newScene);
106+ Render.update(elm.node.firstChild, currentScene, newScene);
107107 currentScene = newScene;
108108 if (elm.Native.Window) elm.Native.Window.resizeIfNeeded();
109109 });