From e5bb0889cd5bcd9123a74cf76f84e8ef60eacf9c Mon Sep 17 00:00:00 2001 From: Kris Borchers Date: Thu, 1 Aug 2013 23:24:29 -0500 Subject: [PATCH] Update everything that can't be polyfilled in old IE. Replace PointerMap.size getter with a size method. Quote properties named delete. --- src/capture.js | 2 +- src/mouse.js | 2 +- src/ms.js | 2 +- src/touch.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/capture.js b/src/capture.js index 464e7724..e07b45e5 100644 --- a/src/capture.js +++ b/src/capture.js @@ -32,7 +32,7 @@ dispatcher.releaseCapture(pointerId, this); }; } - if (!Element.prototype.setPointerCapture) { + if (window.Element && !Element.prototype.setPointerCapture) { Object.defineProperties(Element.prototype, { 'setPointerCapture': { value: s diff --git a/src/mouse.js b/src/mouse.js index 9601eb23..e7138b7e 100644 --- a/src/mouse.js +++ b/src/mouse.js @@ -94,7 +94,7 @@ this.cleanupMouse(); }, cleanupMouse: function() { - pointermap.delete(this.POINTER_ID); + pointermap['delete'](this.POINTER_ID); } }; diff --git a/src/ms.js b/src/ms.js index 7d0c3564..f35f888f 100644 --- a/src/ms.js +++ b/src/ms.js @@ -41,7 +41,7 @@ return e; }, cleanup: function(id) { - pointermap.delete(id); + pointermap['delete'](id); }, MSPointerDown: function(inEvent) { pointermap.set(inEvent.pointerId, inEvent); diff --git a/src/touch.js b/src/touch.js index 0a5c45de..24768ac3 100644 --- a/src/touch.js +++ b/src/touch.js @@ -54,11 +54,11 @@ } }, elementRemoved: function(el) { - this.scrollType.delete(el); + this.scrollType['delete'](el); dispatcher.unlisten(el, this.events); // remove touch-action from shadow allShadows(el).forEach(function(s) { - this.scrollType.delete(s); + this.scrollType['delete'](s); dispatcher.unlisten(s, this.events); }, this); }, @@ -291,7 +291,7 @@ this.cleanUpPointer(inPointer); }, cleanUpPointer: function(inPointer) { - pointermap.delete(inPointer.pointerId); + pointermap['delete'](inPointer.pointerId); this.removePrimaryPointer(inPointer); }, // prevent synth mouse events from creating pointer events