简体   繁体   中英

Browser Developer Tools: Disable Warnings in 3rd Party Scripts

When developing for the web, is there any way to mark a script as an upstream or third-party asset so that warnings from said script will be ignored by the developer tools in your browser or to suppress either specific warnings or warnings in specific files?

For example, I have no interest that Bootstrap isn't using Object.create() in a certain instance and don't care about that warning - I have better things to do than to go fix it.

mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create

(Lots of things raise this warning - not just Bootstrap 4.0.0-alpha.2)

I care mostly about Firefox and Chrome but it would be cool if there was a standard way to do this.

在 Chrome Devtools 中,您可以在控制台窗口的设置中过滤当前上下文,如此超级用户帖子中的屏幕截图所示。

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