ClipboardEvent()

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

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

JavaScript
clipboardEvent = new ClipboardEvent(type<code>, </code>{dataType: aMimeType, 
                                           data    : <code>someData</code>});

Parameters

The ClipboardEvent() constructor also inherits arguments from Event().

type
Is a DOMString representing the name of the type of the ClipboardEvent. It is case-sensitive and can be: 'copy', 'cut', or 'paste'.
dataType
Is a DOMString containing the MIME-type of the data contained in the data argument.
data
Is a DOMString containing the data concerned by the clipboard event.

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 (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/clipboardevent/clipboardevent

API Clipboard API ClipboardEvent Constructor Experimental Expérimental