简体   繁体   English

如何向ie8添加Int32Array支持

[英]how to add Int32Array support to ie8

I'm using scrypt.js for password encryption, in IE8 (apparently IE9 also) gives: 我正在使用scrypt.js进行密码加密,在IE8(显然也是IE9)中,它提供了:

Int32Array is undefined

I've Googled around, and this is just plain unsupported by ie8 and ie9, there should I suspect be some way to add Int32Array support to javascript in ie8 ? 我已经在Google周围搜索过了,而这正是ie8和ie9完全不支持的,我是否应该怀疑有某种方法可以将Int32Array支持添加到ie8中的javascript上? Any leads appreciated. 任何线索表示赞赏。

if(typeof(Int32Array) == "undefined")
{
    Int32Array = function(size)
    {
        if(size < 0 || Math.floor(size) != size) { throw "Invalid array length"; } 
        for(var index = 0; index < size; index++) { this[index] = 0; }
        this.length = size;
    };
    Int32Array.prototype = new Array();
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM