comparison lib/js/urweb.js @ 1781:25824a0e8bf1

Change propagation of source value to textarea
author Adam Chlipala <adam@chlipala.net>
date Fri, 13 Jul 2012 09:01:01 -0400
parents 22858505bb2d
children 5bc4fbf9c0fe
comparison
equal deleted inserted replaced
1780:85a87f155e7b 1781:25824a0e8bf1
935 return x; 935 return x;
936 } 936 }
937 937
938 function tbx(s) { 938 function tbx(s) {
939 var x = input(document.createElement("textarea"), s, 939 var x = input(document.createElement("textarea"), s,
940 function(x) { return function(v) { if (x.innerHTML != v) x.innerHTML = v; }; }); 940 function(x) { return function(v) { if (x.value != v) x.value = v; }; });
941 x.innerHTML = s.data; 941 x.innerHTML = s.data;
942 x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) }; 942 x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) };
943 943
944 return x; 944 return x;
945 } 945 }