on master help sign in
Add xor to runtime.
c866903evancz
elm/elm-runtime-0.7.1.js+5−5
@@ -2622,8 +2622,7 @@ var Dispatcher = function() {
2622 content.appendChild(Render.render(currentElement));
2622 content.appendChild(Render.render(currentElement));
2623 var w = document.getElementById('widthChecker').offsetWidth;
2623 var w = document.getElementById('widthChecker').offsetWidth;
2624 if (w !== window.innerWidth) {
2624 if (w !== window.innerWidth) {
2625− Dispatcher.notify(Elm.Window.dimensions.id,
2625+ Dispatcher.notify(Elm.Window.dimensions.id, Value.Tuple(w, window.innerHeight));
2626− Value.Tuple(w, window.innerHeight));
2627 }
2626 }
2628 program = Elm.Signal.lift(function(value) {
2627 program = Elm.Signal.lift(function(value) {
2629 var content = document.getElementById('content');
2628 var content = document.getElementById('content');
@@ -2655,7 +2654,7 @@ var Dispatcher = function() {
2655 function filterDeadInputs() {
2654 function filterDeadInputs() {
2656 var temp = [];
2655 var temp = [];
2657 for (var i = inputs.length; i--; ) {
2656 for (var i = inputs.length; i--; ) {
2658− if (isAlive(inputs[i])) { temp.push(inputs[i]); }
2657+ if (isAlive(inputs[i])) temp.push(inputs[i]);
2659 }
2658 }
2660 inputs = temp;
2659 inputs = temp;
2661 }
2660 }
@@ -2940,12 +2939,12 @@ Elm.Mouse = function() {
2940 var hasListener2 = Dispatcher.notify(clicks.id, Value.Tuple());
2939 var hasListener2 = Dispatcher.notify(clicks.id, Value.Tuple());
2941 Dispatcher.notify(isClicked.id, false);
2940 Dispatcher.notify(isClicked.id, false);
2942 if (!hasListener1 && !hasListener2)
2941 if (!hasListener1 && !hasListener2)
2943− this.removeEventListener('click',arguments.callee,false);
2942+ this.removeEventListener('click',arguments.callee,false);
2944 });
2943 });
2945 Value.addListener(document, 'mousedown', function(e) {
2944 Value.addListener(document, 'mousedown', function(e) {
2946 var hasListener = Dispatcher.notify(isDown.id, true);
2945 var hasListener = Dispatcher.notify(isDown.id, true);
2947 if (!hasListener)
2946 if (!hasListener)
2948− this.removeEventListener('mousedown',arguments.callee,false);
2947+ this.removeEventListener('mousedown',arguments.callee,false);
2949 });
2948 });
2950 Value.addListener(document, 'mouseup', function(e) {
2949 Value.addListener(document, 'mouseup', function(e) {
2951 var hasListener = Dispatcher.notify(isDown.id, false);
2950 var hasListener = Dispatcher.notify(isDown.id, false);
@@ -3214,6 +3213,7 @@ Elm.Prelude = function() {
3214 return {eq : Value.eq,
3213 return {eq : Value.eq,
3215 id : function(x) { return x; },
3214 id : function(x) { return x; },
3216 not : function(b) { return !b; },
3215 not : function(b) { return !b; },
3216+ xor : function(x) { return function(y) { return x != y; }; },
3217 fst : function(p) { return p[1]; },
3217 fst : function(p) { return p[1]; },
3218 snd : function(p) { return p[2]; },
3218 snd : function(p) { return p[2]; },
3219 rem : function(x) { return function(y) { return x % y; }; },
3219 rem : function(x) { return function(y) { return x % y; }; },