Last active
September 4, 2020 21:57
-
-
Save danopia/4f13b5c9cd2b9e88ff431c31755e43b5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export default fetch |
This file contains hidden or 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
export default 'TODO' |
This file contains hidden or 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
import {WebSocket} from 'https://deno.land/x/[email protected]/mod.ts' | |
export default class BrowserWebSocket extends WebSocket { | |
constructor(url) { | |
super(url); | |
this.on('close', (...args) => this.onclose(...args)); | |
this.on('error', (...args) => this.onerror(...args)); | |
this.on('message', (data) => this.onmessage({ data })); | |
this.on('open', (...args) => this.onopen(...args)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment