Youtube.com中Uncaught TypeError: copy is not a function,如何解决

The issue is that there is an element on that page with id="copy". If you type copy in the console, you should get a element printed out like this:

$ copy
<g id="copy"></g>

So, you‘ll have to remove that element before using the copy function:

document.querySelector(‘#copy‘).remove();

Running it in console again should show it‘s a function:

$ copy
? copy() { [native code] }

Then use copy() as normal, e.g. copy(myVariable)

 

来源:https://*.com/questions/62212958/devtools-console-copy-is-not-a-function-while-on-youtube

Youtube.com中Uncaught TypeError: copy is not a function,如何解决

上一篇:计算机组成原理


下一篇:被严重忽略的一款《经济学人》官方重磅产品