简体   繁体   中英

How can I disable Javascript error messages within browser consoles?

I am using the old Froogaloop2 Vimeo library and I know that this library is deprecated, but I have multiple embeds in a website and it was the only way I could get it to run.

There are console errors...

Uncaught TypeError: Cannot read property 'ready' of undefined at l (froogaloop2.min.js:1) 30froogaloop2.min.js:1 Uncaught TypeError: Cannot read property 'value' of undefined at l (froogaloop2.min.js:1)

I've tried to disable console.log but this unfortunately doesn't fall under that output.

console.log = function() {}

I simply want to avoid the outputs above.

If you need disable "console.log()" try this.

 console.log("Hello World."); // Output : "Hello World." console.log = function (param) {return;} console.log("Hello World."); // Output : nothing. 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM