diff options
-rw-r--r-- | lib/js/urweb.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 42660bf0..4d9a1419 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -129,13 +129,17 @@ function pf(loc) { throw ("Pattern match failure (" + loc + ")"); } +var lameDuck = false; + function runHandlers(kind, ls, arg) { - if (ls == null) - alert(kind + ": " + arg); - for (; ls; ls = ls.next) - try { - exec({c:"a", f:{c:"a", f:ls.data, x:{c:"c", v:arg}}, x:{c:"c", v:null}}); - } catch (v) { } + if (!lameDuck) { + if (ls == null) + alert(kind + ": " + arg); + for (; ls; ls = ls.next) + try { + exec({c:"a", f:{c:"a", f:ls.data, x:{c:"c", v:arg}}, x:{c:"c", v:null}}); + } catch (v) { } + } } var errorHandlers = null; @@ -911,6 +915,8 @@ function listener() { var lines = text.split("\n"); if (lines.length == 1 && lines[0] == "R") { + lameDuck = true; + if (isPost) history.back(); else |