diff lib/js/urweb.js @ 835:b0a85cbefed2

Less whining about match failures; fix singleton record Jscomp bug
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Jun 2009 12:40:09 -0400
parents 5e1a4b12c83a
children 5154a047c6bc
line wrap: on
line diff
--- a/lib/js/urweb.js	Tue Jun 02 11:50:53 2009 -0400
+++ b/lib/js/urweb.js	Tue Jun 02 12:40:09 2009 -0400
@@ -31,7 +31,7 @@
 }
 
 function pf(loc) {
-  whine("Pattern match failure (" + loc + ")");
+  throw ("Pattern match failure (" + loc + ")");
 }
 
 function runHandlers(kind, ls, arg) {
@@ -318,8 +318,11 @@
   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;
 }