ClipboardEvent()

Experimental

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 the ClipboardEvent. It is case-sensitive and can be: 'copy', 'cut', or 'paste'.
options Optional
Options are as follows:
  • clipboardData: A DataTransfer containing the data concerned by the clipboard event.
  • dataType : A DOMString containing the MIME-type of the data contained in the data argument.
  • data : A DOMString containing the data concerned by the clipboard event.

Specifications

Specification
Clipboard API and events
# dom-clipboardevent-clipboardevent

Browser compatibility

BCD tables only load in the browser

See also