comparison lib/js/urweb.js @ 646:fb2a0e76dcef

ListEdit demo, minus prose
author Adam Chlipala <adamc@hcoop.net>
date Tue, 10 Mar 2009 12:44:40 -0400
parents c5991cdb0c4b
children 96ebc6bdb5a0
comparison
equal deleted inserted replaced
645:1b571a05874c 646:fb2a0e76dcef
57 } 57 }
58 58
59 function runScripts(node) { 59 function runScripts(node) {
60 var savedScript = thisScript; 60 var savedScript = thisScript;
61 61
62 var scripts = node.getElementsByTagName("script"); 62 var scripts = node.getElementsByTagName("script"), scriptsCopy = {};
63 var len = scripts.length; 63 var len = scripts.length;
64 for (var i = 0; i < len; ++i)
65 scriptsCopy[i] = scripts[i];
64 for (var i = 0; i < len; ++i) { 66 for (var i = 0; i < len; ++i) {
65 thisScript = scripts[i]; 67 thisScript = scriptsCopy[i];
66 eval(thisScript.textContent); 68 eval(thisScript.textContent);
67 } 69 }
68 70
69 thisScript = savedScript; 71 thisScript = savedScript;
70 } 72 }