![](/img/trans.png)
[英]Getting SCRIPT5009: 'id' is undefined in Internet Explore IE 11
[英]Internet Explorer Error : SCRIPT5009: ArrayBuffer is undefined
我在Internet Explorer 9中收到错误,在其他浏览器上不会出现错误。 它的:
SCRIPT5009:'ArrayBuffer'未定义
我的代码如下
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i);
}
中断的行是var array = new Uint8Array(new ArrayBuffer(rawLength));
有谁知道这是否有解决方案或解决方法? 我要求我的功能适用于所有浏览器。
IE10之前不支持ArrayBuffer
(我认为这显示了它: http : //caniuse.com/typedarrays )。
你可以使用polyfill,这里有一个: https : //github.com/inexorabletash/polyfill/blob/master/typedarray.js
Polyfill取自: https : //github.com/inexorabletash/polyfill
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.