on master help sign in
Change send function to be curry-able.
7d1b40aevancz
runtime/Init.js+1
@@ -44,6 +44,7 @@ Elm.init = function(module, baseNode) {
44
44
45 // Set up methods to communicate with Elm program from JS.
45 // Set up methods to communicate with Elm program from JS.
46 function send(name, value) {
46 function send(name, value) {
47+ if (typeof value === 'undefined') return function(v) { return send(name,v) };
47 var e = document.createEvent('Event');
48 var e = document.createEvent('Event');
48 e.initEvent(name + '_' + elm.id, true, true);
49 e.initEvent(name + '_' + elm.id, true, true);
49 e.value = value;
50 e.value = value;