Clipboard.js: Uncaught TypeError: Illegal constructor

Created on 26 Mar 2019  路  2Comments  路  Source: zenorocha/clipboard.js

I am seeing this error again on Chrome/FireFox when instantiating new Clipboard('.copyText');

Most helpful comment

Using the ClipboardJS constructor helps:
var clipboard = new ClipboardJS('.btn');

All 2 comments

Using the ClipboardJS constructor helps:
var clipboard = new ClipboardJS('.btn');

Thanks @praVishal2910!

Was this page helpful?
0 / 5 - 0 ratings