Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Update everything that can't be polyfilled in old IE.
Browse files Browse the repository at this point in the history
Replace PointerMap.size getter with a size method.
Quote properties named delete.
  • Loading branch information
kborchers committed Oct 31, 2013
1 parent c1d7830 commit e5bb088
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
this.cleanupMouse();
},
cleanupMouse: function() {
pointermap.delete(this.POINTER_ID);
pointermap['delete'](this.POINTER_ID);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/ms.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
return e;
},
cleanup: function(id) {
pointermap.delete(id);
pointermap['delete'](id);
},
MSPointerDown: function(inEvent) {
pointermap.set(inEvent.pointerId, inEvent);
Expand Down
6 changes: 3 additions & 3 deletions src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e5bb088

Please sign in to comment.