Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81155 views
1
/**
2
* Copyright 2013-2014, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
* @providesModule SyntheticTouchEvent
10
* @typechecks static-only
11
*/
12
13
"use strict";
14
15
var SyntheticUIEvent = require('SyntheticUIEvent');
16
17
var getEventModifierState = require('getEventModifierState');
18
19
/**
20
* @interface TouchEvent
21
* @see http://www.w3.org/TR/touch-events/
22
*/
23
var TouchEventInterface = {
24
touches: null,
25
targetTouches: null,
26
changedTouches: null,
27
altKey: null,
28
metaKey: null,
29
ctrlKey: null,
30
shiftKey: null,
31
getModifierState: getEventModifierState
32
};
33
34
/**
35
* @param {object} dispatchConfig Configuration used to dispatch this event.
36
* @param {string} dispatchMarker Marker identifying the event target.
37
* @param {object} nativeEvent Native browser event.
38
* @extends {SyntheticUIEvent}
39
*/
40
function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) {
41
SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
42
}
43
44
SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
45
46
module.exports = SyntheticTouchEvent;
47
48