Pyscript in Firefox extensions

Hey, is that normal that python scripts are not running in extensions popup ? I tested my script by simply running the html file on firefox but when I specify the same html file on the manifest json file for firefox extension, I have only basic html elements in the extension popup and the script I wrote between the elements does not run, it just appears as text.

1 Like

nice to meet you.

Thank you very much for the valuable information.

Since Pyscript itself is an alpha version, it has been tested in Chrome, but it has not been tested in FireFox yet. However, if you give us the test information in Firefox, I think we can go further in the direction of improvement.

@ktsh.tanaka.2020 Could you confirm where you saw mention that it wasn’t tested in Firefox? PyScript examples work consistently for me in both Firefox and Chrome.

I think the issue is far more likely to be some complication with the OPs attempt to run it within an extension

2 Likes

neil

I believe it is that way.

Especially in the case of extensions, the use of APIs is complicated, so the possibility of semaphores and deadlocks cannot be denied.

Especially since program development has become object-oriented, programmers are busy debugging every day because intricately intertwined data and programs do not allow consistent object generation.

Thank you for your return. I also tried for a Google Chrome and this is not working either.
Here is a screenshot of the html file (I remind you that it usually works except in Firefox or Google Chrome extensions)…
image

1 Like

Update : If you want to use Pyscript in your extension, you have to modify the content-script-policy in manifest.json. You should follow errors of the Firefox extensions debugger to allow every link in content-security-policy.
I prefer to warn that it is not very secure.

1 Like