UNPKG

1.05 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 * @interface Event
15 * @see http://www.w3.org/TR/clipboard-apis/
16 */
17var ClipboardEventInterface = {
18 clipboardData: function (event) {
19 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
20 }
21};
22
23/**
24 * @param {object} dispatchConfig Configuration used to dispatch this event.
25 * @param {string} dispatchMarker Marker identifying the event target.
26 * @param {object} nativeEvent Native browser event.
27 * @extends {SyntheticUIEvent}
28 */
29function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
30 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
31}
32
33SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
34
35module.exports = SyntheticClipboardEvent;
\No newline at end of file