-
Notifications
You must be signed in to change notification settings - Fork 895
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
The online/offline checker now presumes that globalThis
is the event target
#3658
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: a66d51b The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
BundleMonUnchanged files (125)
Total files change -12B 0% Final result: ✅ View report in BundleMon website ➡️ |
78a9f6f
to
a66d51b
Compare
A preview of the GitHub Pages site based on this PR is now available here: |
Summary
In the isolated Content Scripts environment,
globalThis.window
is apparently not a thing. In this PR we eliminate that nesting and presume that the event target for listening to online/offline events isglobalThis
itself.Test Plan
Tested that
globalThis.addEventListener('offline', () => {})
fires the callback in Brave when the network connection goes down. Presumed that the same is true for all other browsers.Fixes #3652.