Merge mozilla-central to autoland on a CLOSED TREE
[gecko.git] / dom / webidl / TouchEvent.webidl
blob9cc14505da015893cee2472f143c333998c1f72f
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
7 dictionary TouchEventInit : EventModifierInit {
8   sequence<Touch> touches = [];
9   sequence<Touch> targetTouches = [];
10   sequence<Touch> changedTouches = [];
13 [Func="mozilla::dom::TouchEvent::PrefEnabled",
14  Exposed=Window]
15 interface TouchEvent : UIEvent {
16   constructor(DOMString type, optional TouchEventInit eventInitDict = {});
18   readonly attribute TouchList touches;
19   readonly attribute TouchList targetTouches;
20   readonly attribute TouchList changedTouches;
22   readonly attribute boolean altKey;
23   readonly attribute boolean metaKey;
24   readonly attribute boolean ctrlKey;
25   readonly attribute boolean shiftKey;
27   undefined initTouchEvent(DOMString type,
28                            optional boolean canBubble = false,
29                            optional boolean cancelable = false,
30                            optional Window? view = null,
31                            optional long detail = 0,
32                            optional boolean ctrlKey = false,
33                            optional boolean altKey = false,
34                            optional boolean shiftKey = false,
35                            optional boolean metaKey = false,
36                            optional TouchList? touches = null,
37                            optional TouchList? targetTouches = null,
38                            optional TouchList? changedTouches = null);