-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The online/offline checker now presumes that
globalThis
is the even…
…t target (#3658) # 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 is `globalThis` 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.
- Loading branch information
1 parent
a3b2202
commit 70eb596
Showing
3 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@solana/rpc-subscriptions': patch | ||
--- | ||
|
||
The online/offline checker in the subscriptions implementation no longer throws an error when hosted in the Content Scripts environment of a browser extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters