UNPKG

1.17 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 SyntheticEvent = require('./SyntheticEvent');
12
13/**
14 * `touchHistory` isn't actually on the native event, but putting it in the
15 * interface will ensure that it is cleaned up when pooled/destroyed. The
16 * `ResponderEventPlugin` will populate it appropriately.
17 */
18var ResponderEventInterface = {
19 touchHistory: function (nativeEvent) {
20 return null; // Actually doesn't even look at the native event.
21 }
22};
23
24/**
25 * @param {object} dispatchConfig Configuration used to dispatch this event.
26 * @param {string} dispatchMarker Marker identifying the event target.
27 * @param {object} nativeEvent Native event.
28 * @extends {SyntheticEvent}
29 */
30function ResponderSyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
31 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
32}
33
34SyntheticEvent.augmentClass(ResponderSyntheticEvent, ResponderEventInterface);
35
36module.exports = ResponderSyntheticEvent;
\No newline at end of file