mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[touch-events] Index TouchList as array
myTouchList[123] is allowed as an alias for myTouchList.item(123). https://developer.mozilla.org/en-US/docs/Web/API/TouchList and http://www.w3.org/TR/touch-events/#idl-def-TouchList
This commit is contained in:
parent
0b6a5fb4e0
commit
b2a9fc564e
@ -16,6 +16,7 @@ flag = touchEvent.shiftKey;
|
||||
|
||||
var len:number = list.length;
|
||||
touch = list.item(0);
|
||||
touch == list[0];
|
||||
|
||||
var x: number;
|
||||
var y: number;
|
||||
|
||||
1
touch-events/touch-events.d.ts
vendored
1
touch-events/touch-events.d.ts
vendored
@ -16,6 +16,7 @@ interface TouchEvent extends UIEvent {
|
||||
interface TouchList {
|
||||
length: number;
|
||||
item: (index: number) => Touch;
|
||||
[index: number]: Touch;
|
||||
}
|
||||
|
||||
interface Touch {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user