Is it able to develop a Chrome extension(manifest v3) using frb? #2376
Replies: 4 comments 20 replies
-
Firstly, I wonder whether we can disable that unsafe-eval protection (e.g. by specifying CORS header etc). I am not a web expert so not sure whether we can do that. Secondly, maybe debug to find which line of code causes trouble. For example, you can do console.error in rust code here and there, and bisect to know which line of code gets stuck. |
Beta Was this translation helpful? Give feedback.
-
Added an error log in my init function. It's not called, no console output.
|
Beta Was this translation helpful? Give feedback.
-
Added some logs in rust_lib_xxx.js generated by frb codegen. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I tried to turn my flutter app which using frb into a Chrome extension following this article: https://itnext.io/building-a-chrome-extension-with-flutter-a-step-by-step-guide-ea7260c0c452.
I modified manifest.json and index.html as below, and compile it with:
manifest.json
index.html
There is no problem when running with:
flutter run -d chrome --web-header=Cross-Origin-Opener-Policy=same-origin --web-header=Cross-Origin-Embedder-Policy=require-corp
But after loaded into Chrome as an extension, it ran into an error immediately when clicking extension button:
It failed at the very beginning when initing RustLib.
await RustLib.init();
Beta Was this translation helpful? Give feedback.
All reactions