How to test the availability of asm.js in a web browser?

Viewed 824

Imagine I have a asmjs script but before running the script, I'd like to test and see if the browser supports asm.js or not. If it is false, display a message indicating that the browser is old or something like that, otherwise, execute the script.

Can we utilize the idea of "use asm" somehow to detect if a web browser supports asm.js?

function MyAsmModule() {
    "use asm";
    // module body
}
1 Answers
Related