mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: switch storage to indexeddb
This commit is contained in:
6 files changed
+102
-42
No files matched your search
@@ -54,6 +54,10 @@ export default class Sock {
|
||||
onclose: (code: number, reason: string) => void;
|
||||
onopen: (sock: ReconnectingWebSocket) => void;
|
||||
|
||||
on(event: 'message' | 'close' | 'open', callback: (...args: any[]) => void) {
|
||||
this[`on${event}`] = callback;
|
||||
}
|
||||
|
||||
send(data) {
|
||||
this.sock.send(data);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user