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

Commit e5bb088

Browse files
committed
Update everything that can't be polyfilled in old IE.
Replace PointerMap.size getter with a size method. Quote properties named delete.
1 parent c1d7830 commit e5bb088

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/capture.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
dispatcher.releaseCapture(pointerId, this);
3333
};
3434
}
35-
if (!Element.prototype.setPointerCapture) {
35+
if (window.Element && !Element.prototype.setPointerCapture) {
3636
Object.defineProperties(Element.prototype, {
3737
'setPointerCapture': {
3838
value: s

src/mouse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
this.cleanupMouse();
9595
},
9696
cleanupMouse: function() {
97-
pointermap.delete(this.POINTER_ID);
97+
pointermap['delete'](this.POINTER_ID);
9898
}
9999
};
100100

src/ms.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
return e;
4242
},
4343
cleanup: function(id) {
44-
pointermap.delete(id);
44+
pointermap['delete'](id);
4545
},
4646
MSPointerDown: function(inEvent) {
4747
pointermap.set(inEvent.pointerId, inEvent);

src/touch.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
}
5555
},
5656
elementRemoved: function(el) {
57-
this.scrollType.delete(el);
57+
this.scrollType['delete'](el);
5858
dispatcher.unlisten(el, this.events);
5959
// remove touch-action from shadow
6060
allShadows(el).forEach(function(s) {
61-
this.scrollType.delete(s);
61+
this.scrollType['delete'](s);
6262
dispatcher.unlisten(s, this.events);
6363
}, this);
6464
},
@@ -291,7 +291,7 @@
291291
this.cleanUpPointer(inPointer);
292292
},
293293
cleanUpPointer: function(inPointer) {
294-
pointermap.delete(inPointer.pointerId);
294+
pointermap['delete'](inPointer.pointerId);
295295
this.removePrimaryPointer(inPointer);
296296
},
297297
// prevent synth mouse events from creating pointer events

0 commit comments

Comments
 (0)