web api constructor
ClipboardChangeEvent: ClipboardChangeEvent() constructor
Secure contextLimited availability
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.
- : A string with the name of the event. It should always be set to
optionsOptional- : An object that, in addition to the properties defined in
Event(), can have the following properties:types- : An array of strings representing the data types available on the system clipboard.
changeId- : An integer representing a unique identifier for the clipboard change operation.
- : An object that, in addition to the properties defined in
Return value
A new ClipboardChangeEvent object.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.