-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Chrome #10
Comments
New v3 problem: Web workers do not seem to be available inside the ServiceWorker that's now responsible for the background_script. Right now, I run the WebAssembly instance inside a Worker to stay able to respond to things like translation and model list requests. (WebAssembly calls are blocking, calls to the Worker are through message passing.) |
This actually seems like desirable functionality in the long term, if complicated to implement. Desktop application, browser, word all contacting a shared translation model process. Might also tie in with OS sandboxing. In Linux, I'd just send the stdin/stdout file descriptors as ancillary data over UNIX socket to the master daemon process then close the wrapper process. In windows, this is apparently not possible: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ |
Windows equivalent to move file descriptors: https://lackingrhoticity.blogspot.com/2015/05/passing-fds-handles-between-processes.html |
Current plan for Chrome support:
|
Can we bring this extension to Chrome (and other Chromium based browsers) as well?
Source: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#feature-summary
Oh dear. This has me worried.
Source: https://developer.chrome.com/docs/extensions/mv3/service_workers/
Source: https://developer.chrome.com/docs/extensions/mv3/service_workers/
Oh, that might be our way out. Our current content script has an open port for the full period it is loaded. But I have a feeling that Chrome might crack down on such behaviour.
Source: https://developer.chrome.com/docs/extensions/whatsnew/#m100-native-msg-lifetime
Oh good. That's at least a bit hopeful, even though that has been introduced in 9 February, 2022 and talks about Canary. So I'm not expecting this in mainline anytime soon.
Technically most parts of this extension can run in the content-script but then you'd have TranslateLocally started separately for every iframe and that's just insane. Or TranslateLocally would have to do some tmux-like magic where it can spawn its own daemon and connect to it somehow but don't even think about going down that route.
Other scary bug reports:
… Browsers are like the TSA: in name of security you can barely do anything anymore.
The text was updated successfully, but these errors were encountered: