簡體   English   中英

如何向ie8添加Int32Array支持

[英]how to add Int32Array support to ie8

我正在使用scrypt.js進行密碼加密,在IE8(顯然也是IE9)中,它提供了:

Int32Array is undefined

我已經在Google周圍搜索過了,而這正是ie8和ie9完全不支持的,我是否應該懷疑有某種方法可以將Int32Array支持添加到ie8中的javascript上? 任何線索表示贊賞。

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