I am developing new webextension using openpgpjs. The problem is, they use AsmJS for some of their JS functions and I am unable to develop it on firefox.
I have encountered problem only on firefox. I tried different versions, but it only changes the error message (sometimes, it is only warning message and it fails when I try to call functions using AsmJS. On chrome, it works fine. The error message from firefox v69.0 is Error: AsmJS modules do not yet support cloning. and nor line in code nor module name is provided. Error is displayed in JS console every time openpgpjs module is loaded with my webextension.
Is there some way, how I can force browsers to not use AsmJS and just "fall back" into "native" javascript? Or maybe somehow disable debugging for library script? Include script different way in manifest file, so browser will not try to run debugger on it? (I want to disable debugging because I belive, that debugger is unable to debug code translated via AsmJS).
This is how I load both my JS script and library in manifest file. There are no background scripts.
{
"content_scripts" : [
{
"matches" : [ "*://*.testdomain.cz/*" ],
"js": [
"/src/js/openpgp.min.js",
"/src/js/pgpDecryptor.js"
]
}
]
}
Since I was unable to find better solution, I deleted "use asm" from library functions (as meintioned in comments by @Nickolay).