UNPKG

1.16 kBJavaScriptView Raw
1/**
2 * Copyright (c) 2013-present, Facebook, Inc.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 */
8
9'use strict';
10
11var SyntheticUIEvent = require('./SyntheticUIEvent');
12
13var getEventModifierState = require('./getEventModifierState');
14
15/**
16 * @interface TouchEvent
17 * @see http://www.w3.org/TR/touch-events/
18 */
19var TouchEventInterface = {
20 touches: null,
21 targetTouches: null,
22 changedTouches: null,
23 altKey: null,
24 metaKey: null,
25 ctrlKey: null,
26 shiftKey: null,
27 getModifierState: getEventModifierState
28};
29
30/**
31 * @param {object} dispatchConfig Configuration used to dispatch this event.
32 * @param {string} dispatchMarker Marker identifying the event target.
33 * @param {object} nativeEvent Native browser event.
34 * @extends {SyntheticUIEvent}
35 */
36function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
37 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
38}
39
40SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
41
42module.exports = SyntheticTouchEvent;
\No newline at end of file