Mercurial > urweb
comparison lib/js/urweb.js @ 686:3b46548f701b
Don't self-update ctextboxes unnecessarily
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 02 Apr 2009 10:57:14 -0400 |
parents | 5bbb542243e8 |
children | 01b6f2ee2ef0 |
comparison
equal
deleted
inserted
replaced
685:c73c5fe72388 | 686:3b46548f701b |
---|---|
86 | 86 |
87 function inp(t, s) { | 87 function inp(t, s) { |
88 var x = document.createElement(t); | 88 var x = document.createElement(t); |
89 x.value = s.v; | 89 x.value = s.v; |
90 addNode(x); | 90 addNode(x); |
91 s.h = cons(function() { x.value = s.v }, s.h); | 91 s.h = cons(function() { if (x.value != s.v) x.value = s.v }, s.h); |
92 x.onkeyup = function() { sv(s, x.value) }; | 92 x.onkeyup = function() { sv(s, x.value) }; |
93 return x; | 93 return x; |
94 } | 94 } |
95 | 95 |
96 function eh(x) { | 96 function eh(x) { |