Suppress writing errors to browser console from dojo/request

无人久伴 提交于 2019-12-02 01:16:34

I do not think this is possible. Reporting network errors is not a feature of Dojo, nor plain vanilla JavaScript. Even event.preventDefault()/event.stopPropagation() when handling crude XMLHttpRequest or console.error = function(){} have no effect.

You can suppress network errors logging in Firebug:

Dragonfly and F12 Developer Tools in IE9 do not log network errors into the console. Chrome Dev Tools does and I cannot find the way to disable it.

Users do not use your application with Dev Tools opened, so they won't see any errors at all and those who are willing to see them have dozens of methods to accomplish that hacking. Anyway, I would also prefer having an option here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!