-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69696a9
commit 69394b8
Showing
10 changed files
with
111 additions
and
79 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import { polyfillBroadcastChannel, WebSocketBroadcastChannel } from "./mod.ts"; | ||
// noinspection JSAnnotator,ES6ConvertVarToLetConst | ||
|
||
/** | ||
* @module polyfill | ||
* | ||
* This module polyfills the {@link BroadcastChannel} API, where not available. | ||
* | ||
* If already available, such as on Deno Deploy, it does nothing. | ||
* If `BroadcastChannel` is already available, such as on Deno Deploy, this has no effect. | ||
*/ | ||
|
||
import { | ||
BroadcastChannelIsh, | ||
polyfillBroadcastChannel, | ||
WebSocketBroadcastChannel, | ||
} from "./mod.ts"; | ||
|
||
declare global { | ||
// deno-lint-ignore ban-ts-comment | ||
// @ts-ignore | ||
// deno-lint-ignore no-var | ||
var BroadcastChannel = WebSocketBroadcastChannel; | ||
type BroadcastChannel = BroadcastChannelIsh; | ||
} | ||
|
||
polyfillBroadcastChannel(); |
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
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
Oops, something went wrong.