diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-12 15:33:38 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-12 15:33:38 -0700 |
commit | 3c45d72c1af4c93c498353c139d218a7df574c0f (patch) | |
tree | 5080b1cf1d0c019b09e36f5b6f25becb8ad379d1 /tools/reproduceriter.py | |
parent | c351a4faf3f5e8bcc3103bfa67bdef18847a8b80 (diff) |
script loading in shell replay
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-x | tools/reproduceriter.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index ff7dd253..8e0c5904 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -211,6 +211,18 @@ if (typeof nagivator == 'undefined') { createElement: function(what) { switch (what) { case 'canvas': return document.getElementById(what); + case 'script': { + var ret = {}; + window.setTimeout(function() { + load(fixPath(ret.src)); + if (ret.onload) { + window.setTimeout(function() { + ret.onload(); // yeah yeah this might vanish + }); + } + }); + return ret; + } default: throw 'createElement ' + what; } }, @@ -226,6 +238,9 @@ if (typeof nagivator == 'undefined') { cssRules: [], insertRule: function(){}, }], + body: { + appendChild: function(){}, + }, }; //*/ var alert = function(x) { @@ -233,7 +248,7 @@ if (typeof nagivator == 'undefined') { }; var performance = { now: function() { - print('performance.now!'); + print('performance.now! ' + new Error().stack); return Date.now(); // XXX XXX XXX }, }; |