Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Clipboard function in google chrome

In google chrome there is function/constructor Clipboard what is used for? (it show up if you run console.dir(window)).

When I try to call that function

Clipboard();

it say that:

TypeError: Illegal constructor

the same if I try to create new instance

new Clipboard();
like image 443
jcubic Avatar asked Nov 11 '22 23:11

jcubic


1 Answers

According to the spec, Clipboard is supposed to be an interface implemented by navigator.clipboard. You can’t create a Clipboard by hand; you must use navigator.clipboard.

like image 189
bfontaine Avatar answered Nov 15 '22 06:11

bfontaine