ClipboardChangeEvent: ClipboardChangeEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The ClipboardChangeEvent() constructor creates a new ClipboardChangeEvent object instance when a clipboardchange event occurs. The clipboardchange event fires whenever the system clipboard contents are changed either by a web app or any other system application.
Note: This event constructor is generally not needed for production websites. Its primary use is for tests that require an instance of this event.
Syntax
new ClipboardChangeEvent(type)
new ClipboardChangeEvent(type, options)
Parameters
type-
A string with the name of the event. It should always be set to
clipboardchange. optionsOptional-
An object that, in addition to the properties defined in
Event(), can have the following properties:
Return value
A new ClipboardChangeEvent object.
Specifications
| Specification |
|---|
| Clipboard API and events> # dom-clipboardchangeevent-clipboardchangeevent> |