Failed to override the getResponseHeader method on XMLHttpRequest

风格不统一 提交于 2019-12-06 14:07:30

XMLHttpRequest is a host object (i.e. an object provided by the environment to represent something about the environment rather than part of the language), and host objects can essentially do whatever they like. They're not bound by the same rules as built-in objects. IE is particularly notable for making use of this freedom and many of its host objects (including XMLHttpRequest) do not behave as one might hope.

For this reason, it's better not to try and add or change any property of any host object. Instead, write your own XMLHttpRequest wrapper.

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