Suppress writing errors to browser console from dojo/request

前端 未结 1 1234
后悔当初
后悔当初 2021-01-22 05:06

Does anybody know how to suppress errors from being shown in browser console when executing dojo/request.

For example, I make a post request to backend which returns HTT

相关标签:
1条回答
  • 2021-01-22 05:35

    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: enter image description here

    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.

    0 讨论(0)
提交回复
热议问题