UNPKG

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