aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-02 12:40:09 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-02 12:40:09 -0400
commit03ab7faa47089d1dc5757adc0288d63f02b3ade8 (patch)
tree881b970859757ebd3e49447af14a5ea7348461c7 /lib/js
parent67d67ecae2fdb8708e6207db04880d89d43ba1cb (diff)
Less whining about match failures; fix singleton record Jscomp bug
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 0cc66bc7..581ee4d7 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -31,7 +31,7 @@ function whine(msg) {
}
function pf(loc) {
- whine("Pattern match failure (" + loc + ")");
+ throw ("Pattern match failure (" + loc + ")");
}
function runHandlers(kind, ls, arg) {
@@ -318,8 +318,11 @@ function sel(s, content) {
var x = input("select", s, function(x) { return function(v) { if (x.value != v) x.value = v; }; });
x.innerHTML = content;
x.value = s.data;
+ if (x.value != s.data)
+ sv(s, x.value);
x.onchange = function() { sv(s, x.value) };
+
return x;
}