-
Notifications
You must be signed in to change notification settings - Fork 56
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
Publish minutes of extra TPAC 2023 meetings #459
Conversation
* [rob] You want to get the handle to communicate across contexts. If comms are supported as part of the userScript API you don't need this. But otherwise this primitive would enable you to communicate between worlds (isolated world and user script world). In the userScripts API design, have you considered synchronous communication between user script and manager? | ||
* [oliver] is the reason for that to cancel an event? | ||
* [rob] There are user script APIs that are synchronous (GM_getValue), changing that would break existing scripts. Admittedly, without special API support, it would be possible to establish an initially secure communication channel between the isolated world and the user script world, by saving copies of prototypes and using a secret event name to communicate. | ||
* [devlin] Having a communication channel is something we'll pursue, but I don't know that I'd comment to it being synchronous. User scripts, I hope, won't have that much data associated with them. You could asynchronously update the data exposed by the user script manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many popular userscripts absolutely need to run before the first JS statement of the page even if it's an inline <script>alert(1)</script>
and they need their config synchronously at document_start.
* [rob] MV2 Chrome extensions can currently inject an inline script element, a primitive that is also built upon in the user scripts API. MV3 extensions can't do so due to the default CSP, and Firefox extensions cannot bypass the page's CSP to permit inline scripts either. Rather than disabling the script execution restrictions, I would prefer a dedicated API to run specific scripts from the content script. | ||
* [devlin] Why wouldn't the extension use scripting.executeScript? | ||
* [rob] if there's a way to directly invoke from a content script, this could be extended to pass a handle to communicate between the main and isolated world. There are classes of extensions that want to run a trusted piece in the main world and have a trusted piece of code in an isolated script. | ||
* [devlin] It's impossible to have a trusted main world script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible, but it's very hard, particularly because of https://crbug.com/1261964, see how Tampermonkey or Violentmonkey do it via a detached iframe + closed shadow DOM + extraction of prototypes and careful use of those.
* [tomislav] lets separate externally_connectable from this, and only focus on the extension world. Safari does not support externally connected right? | ||
* [kiara] no, we do support it | ||
* [tomislav] oh, ok. I was out of date. Can we discuss the two concepts separately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do support it, and had to only expose window.browser
to pages since in our very limited testing we saw pages thinking Safari was Chrome because window.chrome
existed.
* [patrick] Is there a reason we can't expose browser as an alias? | ||
* [devlin] That's largely what we're discussing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an alias in Safari, window.chrome === window.browser
.
52d7ee8
to
a9770d5
Compare
@oliverdunk Is there anything to add/modify before merging it? The meeting notes are supposed to reflect the discussion that has taken place; if there is anything more, we can discuss that separately in new issues or in the biweekly meetings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only had a chance to skim this but assuming it's just a tidied up version of the doc we reviewed, I'm happy :)
Generated from (non-public) https://docs.google.com/document/d/1ebrHySL0oag2u3gnXogM8LuahT397kKDNVRFYQDWy-8/edit using the tool and process from #105.
During these face-to-face meetings at TPAC 2023 (#385) we discussed #433, #414, #403, #113, #438, #251, #338, #431, #450, #316, #293, #387, #440, #238, #365.