mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
34 lines
611 B
TypeScript
34 lines
611 B
TypeScript
/// <reference path="touch-events.d.ts"/>
|
|
|
|
var touchEvent:TouchEvent;
|
|
var list:TouchList;
|
|
var touch:Touch;
|
|
|
|
list = touchEvent.touches;
|
|
list = touchEvent.targetTouches;
|
|
list = touchEvent.changedTouches;
|
|
|
|
var flag:boolean;
|
|
flag = touchEvent.altKey;
|
|
flag = touchEvent.metaKey;
|
|
flag = touchEvent.ctrlKey;
|
|
flag = touchEvent.shiftKey;
|
|
|
|
var len:number = list.length;
|
|
touch = list.item(0);
|
|
|
|
var x: number;
|
|
var y: number;
|
|
var id: number;
|
|
|
|
id = touch.identifier;
|
|
x = touch.screenX;
|
|
y = touch.screenY;
|
|
x = touch.clientX;
|
|
y = touch.clientY;
|
|
x = touch.pageX;
|
|
y = touch.pageY;
|
|
|
|
var target:EventTarget;
|
|
target = touch.target;
|