onReadyStateChange not firing in IE for XHR Request

后端 未结 2 1128
死守一世寂寞
死守一世寂寞 2021-01-28 13:50

I have this code that I am using and it works fine in chrome, but in IE, it looks like that onreadystatechenge is not firing.

How do I get this to work cross browser. I

2条回答
  •  庸人自扰
    2021-01-28 14:20

    Apparently IE 11 (which I assume is what you are testing is broken) removed script.onreadystatechange in favor of script.onload.

    Here is the compatibility for xhr.onload.

    Source of IE11 removing it

提交回复
热议问题