I need to programmatically create a ClipboardEvent instance in Chrome.
But when I run the constructor:
new ClipboardEvent("paste", {dataType: "text/plain", data: "some data"})
It throws the following error:
Uncaught TypeError: Illegal constructor
The constructor works as intended in Firefox.
Checked MDN and W3C spec and they don't mention anything about it being illegal to create instances of ClipboardEvent.
Is it possible to create an instance of ClipboardEvent in Chrome in any other way? I prefer to not mock a custom ClipboardEvent when one exists.
Update 2018-07-17: Using the ClipboardEvent seems to work in Chrome 69.