Commit graph

17 commits

Author SHA1 Message Date
David Reed
f905b01477
use ultraviolet.script values 2022-11-23 13:02:07 -05:00
David Reed
561a1ee190
run ESLint
Several bugs were found (and fixed):
src/client/index.js:71
the following if() was equivalent to if (false in obj)

src/client/dom/element.js:207
the following if() was equivalent to if (!element || false in element)

src/client/rewrite/html.js:179
an undefined iterate() was referenced
2022-11-23 12:37:00 -05:00
David Reed
dbc01b3d56
remove unused bowser 2022-11-23 12:23:42 -05:00
David Reed
f08364edcd
remove case for status 500 2022-11-19 20:06:02 -05:00
David Reed
1a1bf9b500
npm events, expose EventEmitter via bundle 2022-11-19 19:57:18 -05:00
David Reed
7ef4fb9732
log error, add fetch to try catch 2022-11-19 19:51:15 -05:00
David Reed
edb339b137
remove requestCtx.forward 2022-11-19 19:11:41 -05:00
David Reed
30f17a2b5c
set user-agent in fetch
Firefox doesn't pass user-agent in the serviceworker request headers. We need to manaully provide this.
2022-11-19 19:05:55 -05:00
David Reed
12e9d3c0f8
bareClient 2022-11-19 19:02:37 -05:00
David Reed
1700d17e09
use correct address API 2022-11-19 19:02:17 -05:00
David Reed
b7249e5819
WebSocket support
What I did:
- juggle the bare client data between the page and SW
- mock the WebSocket class to perform async ops
There are still bugs:
- new WebSocket().constructor is the mock class
- eventTarget() feels very stomp-like
2022-11-18 21:11:51 -05:00
David Reed
bd51158873
cleanup iterator 2022-11-18 20:29:10 -05:00
David Reed
5e71b8138b
separate consts 2022-11-18 20:28:50 -05:00
David Reed
015045f2c5
some JSDoc, install @tomphttp/bare-client 2022-11-18 20:25:49 -05:00
David Reed
8f999e7236
prettier 2022-11-18 20:00:58 -05:00
David Reed
0bff4aacd2 break serviceworkers 2022-09-15 18:08:01 -04:00
David Reed
471f591ab0 import core scripts from ultraviolet-core 2022-09-15 17:12:58 -04:00