This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The ClipboardEvent()
constructor returns a newly created ClipboardEvent
, representing an event providing information related to modification of the clipboard, that is cut
, copy
, and paste
events.
Syntax
var clipboardEvent = new ClipboardEvent(type[,
options]
);
Parameters
The ClipboardEvent()
constructor also inherits arguments from Event()
.
- type
- Is a
DOMString
representing the name of the type of theClipboardEvent
. It is case-sensitive and can be:'copy'
,'cut'
, or'paste'
. - options Optional
- Options are as follows:
Specifications
Specification | Status | Comment |
---|---|---|
Clipboard API and events The definition of 'ClipboardEvent()' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 58 | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 58 | 58 | (Yes) | (Yes) | (Yes) | (Yes) |
See also
- Copy-related events:
copy
,cut
,paste
- The
ClipboardEvent
interface it belongs to.