summaryrefslogtreecommitdiff
path: root/lib/js
diff options
context:
space:
mode:
authorGravatar Vladimir Shabanov <vshabanoff@gmail.com>2017-12-05 17:24:12 +0300
committerGravatar Vladimir Shabanov <vshabanoff@gmail.com>2017-12-05 17:29:28 +0300
commita707c42ce3773318f80ed78eea653a581639fdba (patch)
tree6b82f5c0067a785575a037e5534a8eb7041a3721 /lib/js
parent8604afcbc37276760ae74b2d1fbe200aa4b64dce (diff)
Added oninput event to inputs which support it.
Added onscroll event to <body> and title/sizes attributes to <link>.
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index ebe192ca..1a275451 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -1389,6 +1389,14 @@ function addOnChange(x, f) {
x.onchange = function() { old(); f(); };
}
+function addOnInput(x, f) {
+ var old = x.oninput;
+ if (old == null)
+ x.oninput = f;
+ else
+ x.oninput = function() { old(); f(); };
+}
+
function addOnKeyUp(x, f) {
var old = x.onkeyup;
if (old == null)