smesh_lol_web_common_jsbridge_sw.mjs raw
1 // Package smesh.lol/web/common/jsbridge/sw
2 // Generated by MoxieJS — Moxie JavaScript backend
3
4 import * as $rt from './$runtime/index.mjs';
5
6 // Package-level variables
7
8 export function init() {
9 return;
10 }
11
12 // jsbridge: sw.OnInstall
13 export function OnInstall(fn) {
14 $rt.sw.OnInstall(fn);
15 }
16
17 // jsbridge: sw.OnActivate
18 export function OnActivate(fn) {
19 $rt.sw.OnActivate(fn);
20 }
21
22 // jsbridge: sw.OnFetch
23 export function OnFetch(fn) {
24 $rt.sw.OnFetch(fn);
25 }
26
27 // jsbridge: sw.OnMessage
28 export function OnMessage(fn) {
29 $rt.sw.OnMessage(fn);
30 }
31
32 // jsbridge: sw.WaitUntil
33 export function WaitUntil(event, fn) {
34 $rt.sw.WaitUntil(event, fn);
35 }
36
37 // jsbridge: sw.RespondWith
38 export function RespondWith(event, resp) {
39 $rt.sw.RespondWith(event, resp);
40 }
41
42 // jsbridge: sw.RespondWithNetwork
43 export function RespondWithNetwork(event) {
44 $rt.sw.RespondWithNetwork(event);
45 }
46
47 // jsbridge: sw.RespondWithCacheFirst
48 export function RespondWithCacheFirst(event) {
49 $rt.sw.RespondWithCacheFirst(event);
50 }
51
52 // jsbridge: sw.GetRequestURL
53 export function GetRequestURL(event) {
54 return $rt.sw.GetRequestURL(event);
55 }
56
57 // jsbridge: sw.GetRequestPath
58 export function GetRequestPath(event) {
59 return $rt.sw.GetRequestPath(event);
60 }
61
62 // jsbridge: sw.GetMessageData
63 export function GetMessageData(event) {
64 return $rt.sw.GetMessageData(event);
65 }
66
67 // jsbridge: sw.GetMessageClientID
68 export function GetMessageClientID(event) {
69 return $rt.sw.GetMessageClientID(event);
70 }
71
72 // jsbridge: sw.Origin
73 export function Origin() {
74 return $rt.sw.Origin();
75 }
76
77 // jsbridge: sw.SkipWaiting
78 export function SkipWaiting() {
79 $rt.sw.SkipWaiting();
80 }
81
82 // jsbridge: sw.ClaimClients
83 export function ClaimClients(done) {
84 $rt.sw.ClaimClients(done);
85 }
86
87 // jsbridge: sw.MatchClients
88 export function MatchClients(fn) {
89 $rt.sw.MatchClients(fn);
90 }
91
92 // jsbridge: sw.PostMessage
93 export function PostMessage(client, msg) {
94 $rt.sw.PostMessage(client, msg);
95 }
96
97 // jsbridge: sw.PostMessageJSON
98 export function PostMessageJSON(client, json) {
99 $rt.sw.PostMessageJSON(client, json);
100 }
101
102 // jsbridge: sw.GetClientByID
103 export function GetClientByID(id, fn) {
104 $rt.sw.GetClientByID(id, fn);
105 }
106
107 // jsbridge: sw.Navigate
108 export function Navigate(client, url) {
109 $rt.sw.Navigate(client, url);
110 }
111
112 // jsbridge: sw.CacheOpen
113 export function CacheOpen(name, fn) {
114 $rt.sw.CacheOpen(name, fn);
115 }
116
117 // jsbridge: sw.CacheAddAll
118 export function CacheAddAll(cache, urls, done) {
119 $rt.sw.CacheAddAll(cache, urls, done);
120 }
121
122 // jsbridge: sw.CacheFromManifests
123 export function CacheFromManifests(cache, staticFiles, done) {
124 $rt.sw.CacheFromManifests(cache, staticFiles, done);
125 }
126
127 // jsbridge: sw.CachePut
128 export function CachePut(cache, url, resp, done) {
129 $rt.sw.CachePut(cache, url, resp, done);
130 }
131
132 // jsbridge: sw.CacheMatch
133 export function CacheMatch(url, fn) {
134 $rt.sw.CacheMatch(url, fn);
135 }
136
137 // jsbridge: sw.CacheDelete
138 export function CacheDelete(name, done) {
139 $rt.sw.CacheDelete(name, done);
140 }
141
142 // jsbridge: sw.Fetch
143 export function Fetch(url, fn) {
144 $rt.sw.Fetch(url, fn);
145 }
146
147 // jsbridge: sw.FetchAll
148 export function FetchAll(urls, onEach, onDone) {
149 $rt.sw.FetchAll(urls, onEach, onDone);
150 }
151
152 // jsbridge: sw.ResponseOK
153 export function ResponseOK(resp) {
154 return $rt.sw.ResponseOK(resp);
155 }
156
157 // jsbridge: sw.SSEConnect
158 export function SSEConnect(url, onMessage) {
159 return $rt.sw.SSEConnect(url, onMessage);
160 }
161
162 // jsbridge: sw.SSEClose
163 export function SSEClose(id) {
164 $rt.sw.SSEClose(id);
165 }
166
167 // jsbridge: sw.SetTimeout
168 export function SetTimeout(ms, fn) {
169 return $rt.sw.SetTimeout(ms, fn);
170 }
171
172 // jsbridge: sw.ClearTimeout
173 export function ClearTimeout(t) {
174 $rt.sw.ClearTimeout(t);
175 }
176
177 // jsbridge: sw.NowSeconds
178 export function NowSeconds() {
179 return $rt.sw.NowSeconds();
180 }
181
182 // jsbridge: sw.NowMillis
183 export function NowMillis() {
184 return $rt.sw.NowMillis();
185 }
186
187 // jsbridge: sw.Log
188 export function Log(msg) {
189 $rt.sw.Log(msg);
190 }
191
192