@@ -54,34 +54,6 @@ var Elm = function() {
55var Dispatcher = function() {
55var Dispatcher = function() {
56 var program = null;
56 var program = null;
57− var update = function(context, newNode, oldNode) {
58− if (oldNode.style && newNode.style) {
59− oldNode.style.width = newNode.style.width;
60− oldNode.style.height = newNode.style.height;
62− if (newNode.hasOwnProperty('isElmLeaf') &&
63− oldNode.hasOwnProperty('isElmLeaf')) {
64− newNode.id = oldNode.id;
65− if (!newNode.isEqualNode(oldNode)) {
66− context.replaceChild(newNode, oldNode);
70− if (newNode.nodeName === "CANVAS") {
71− context.replaceChild(newNode, oldNode);
74− var nlist = newNode.childNodes;
75− var olist = oldNode.childNodes;
76− if (nlist.length !== olist.length) {
77− context.replaceChild(newNode, oldNode);
80− for (var i = nlist.length; i--; ) {
81− update(oldNode, nlist[i], olist[i]);
85 var correctSize = function(e) {
57 var correctSize = function(e) {
86 var kids = e.childNodes;
58 var kids = e.childNodes;
87 var len = kids.length;
59 var len = kids.length;
@@ -142,7 +114,7 @@ var Dispatcher = function() {
142 var notify = function(id, v) {
114 var notify = function(id, v) {
143 if (program.step(id,v)) {
115 if (program.step(id,v)) {
144 var content = document.getElementById('content');
116 var content = document.getElementById('content');
145− update(content, program.value, content.children[0]);
117+ content.replaceChild(program.value, content.children[0]);
146 correctSize(content);
118 correctSize(content);