-
Notifications
You must be signed in to change notification settings - Fork 94
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
API type safety updates #457
API type safety updates #457
Conversation
✔️ No visual differences introduced by this PR. View Playwright Report (note: open the "playwright-report" artifact) |
(Merge conflict) |
6746e22
to
ac396af
Compare
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.
Nice! BTW, I've noticed that sometimes the version of the code running in the service worker and the version of the code running in the content script can get desynced, at least in Chrome, due to the service worker not properly updating even when the extension updates. I guess that might be quite problematic for an api-breaking change like this. It'd be nice if we could have the content script check the service worker version (and vice versa?) and somehow make it force restart if needed. Not sure if that is even possible though...
I've not seen that happen. I know that some of the extension scripts usually won't update as you're editing them live, but that's expected. Do you know under what conditions you've seen that happen? I usually manually reload the extension after making changes, and haven't seen any issues doing it that way. |
Looks like it was likely just fixed in a patch version update of Chrome... https://bugs.chromium.org/p/chromium/issues/detail?id=1498035 Taking this update fixed the most obvious way I was reproducing it. So hopefully it fixes it for others too. Though not sure if everyone will be on such a fresh Chrome version... |
More type safety via use of API maps, this time covering mostly all of the messages that are sent to the frontend; i.e. either content scripts or extension web pages.