summaryrefslogtreecommitdiff
path: root/lib/js/urweb.js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 13:18:31 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 13:18:31 -0400
commitdf3de8503f41b7f317167273e636cd722ba31bc1 (patch)
tree2d38397e8bfd910828e32184e9adbda761b1ae84 /lib/js/urweb.js
parente6dd56d42a28138bcd9fdea52d0b232839c298dc (diff)
Proper lifting of MonoEnv stored expressions; avoidance of onchange clobbering
Diffstat (limited to 'lib/js/urweb.js')
-rw-r--r--lib/js/urweb.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 2943c897..d0322bff 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -301,11 +301,19 @@ function inp(t, s, content) {
return x;
}
+function addOnChange(x, f) {
+ var old = x.onchange;
+ x.onchange = function() { old(); f (); };
+}
+
// Basic string operations
function eh(x) {
- return x.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
+ if (x == null)
+ return "NULL";
+ else
+ return x.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
}
function ts(x) { return x.toString() }