简体   繁体   English

有没有一种聪明的方法可以从代码中检查asm.js是否处于活动状态?

[英]Is there a clever way to check from code whether asm.js is active or not?

有谁知道一种不用依靠浏览器版本而仅仅假设它可以工作的JavaScript方式吗?

As per the question linked by James Donnelly above, calling toString() on methods exported from asm.js modules will return 根据上面的James Donnelly链接的问题,在从asm.js模块导出的方法上调用toString()将返回

'function method() { [native code] }'

if the module has been compiled successfully and the JS source otherwise. 如果模块已成功编译,则为JS源。

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

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