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 SyntheticClipboardEvent
10
* @typechecks static-only
11
*/
12
13
"use strict";
14
15
var SyntheticEvent = require('SyntheticEvent');
16
17
/**
18
* @interface Event
19
* @see http://www.w3.org/TR/clipboard-apis/
20
*/
21
var ClipboardEventInterface = {
22
clipboardData: function(event) {
23
return (
24
'clipboardData' in event ?
25
event.clipboardData :
26
window.clipboardData
27
);
28
}
29
};
30
31
/**
32
* @param {object} dispatchConfig Configuration used to dispatch this event.
33
* @param {string} dispatchMarker Marker identifying the event target.
34
* @param {object} nativeEvent Native browser event.
35
* @extends {SyntheticUIEvent}
36
*/
37
function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) {
38
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent);
39
}
40
41
SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
42
43
module.exports = SyntheticClipboardEvent;
44
45
46