aboutsummaryrefslogtreecommitdiff
path: root/js/Dom.js
diff options
context:
space:
mode:
authorJoris2017-05-08 20:44:45 +0200
committerJoris2017-05-08 20:44:45 +0200
commit14433a928f7fdf9be3193812cbbed1a5ae49ecd7 (patch)
treea9a81b57922ba007f9864db9fbe789e559d10fb3 /js/Dom.js
parent9e4c00c3df11b7ffc1e9b626ffbf5a74521b5a7a (diff)
downloadcooking-14433a928f7fdf9be3193812cbbed1a5ae49ecd7.tar.gz
cooking-14433a928f7fdf9be3193812cbbed1a5ae49ecd7.tar.bz2
cooking-14433a928f7fdf9be3193812cbbed1a5ae49ecd7.zip
Let the user upgrade an ingredient quantity and adapt other quantities
Diffstat (limited to 'js/Dom.js')
-rw-r--r--js/Dom.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/Dom.js b/js/Dom.js
new file mode 100644
index 0000000..6835c1f
--- /dev/null
+++ b/js/Dom.js
@@ -0,0 +1,12 @@
+"use strict";
+
+exports.onInput = function (elt) {
+ return function (f) {
+ return function () {
+ elt.oninput = function(e) {
+ f(e.target.value)()
+ }
+ return {};
+ };
+ };
+};