javascript判断是否支持WebAssembly
function iswebasm(){ var useWasm = 0; var webAsmObj = window["WebAssembly"]; if (typeof webAsmObj === "object") { if (typeof webAsmObj["Memory"] === "function") { if ((typeof webAsmObj["instantiateStreaming"] === "function") || (typeof webAsmObj["instantiate"] === "function")) useWasm = 1; } } }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/18761.html