Commit graph

23 commits

Author SHA1 Message Date
David Reed
63516b3217
use self 2022-12-03 16:28:19 -05:00
David Reed
06580d90b7
store __uv$ variables as typed consts 2022-12-03 16:27:58 -05:00
David Reed
ea98f9361e
provide randomly chosen bare server URL & refactor
Allows a list of bare servers to be passed to `bare` in __uv$config
2022-12-02 18:02:02 -05:00
David Reed
7b53361367
check if __uv is set before setting uv data 2022-11-26 15:41:31 -05:00
David Reed
38a715b3a2
less annoying JSDoc types 2022-11-23 14:28:11 -05:00
David Reed
602414a586
conditional reference to HTMLIFrameElement
This will prevent an exception being thrown in workers.
2022-11-23 13:57:14 -05:00
David Reed
e502dc33ea
export UVClient separate 2022-11-23 13:34:38 -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
07fa54b096
string 2022-11-20 21:46:58 -05:00
David Reed
bea03730b8
remove return from setters 2022-11-20 21:43:22 -05:00
David Reed
1b35d03f6c
catch uvHook failure, use window.websocket 2022-11-20 01:48:43 -05:00
David Reed
4c6c652fe2
cleanup injection, pass important properties to iframe 2022-11-20 01:38:57 -05:00
David Reed
ff527d9732
fix undefined 2022-11-20 01:28:51 -05:00
David Reed
ad0de820ef
protect WebSocket methods 2022-11-19 18:18:49 -05:00
David Reed
ff8708438e
fixes, install beta client 2022-11-19 17:44:47 -05:00
David Reed
32439bff19
cleanup websocket code
There should be less obvious leaks
WebSocket methods aren't hidden
2022-11-19 17:35:09 -05:00
David Reed
ca284dad3b
directly pass protocol 2022-11-18 21:28:46 -05:00
David Reed
57a26473aa
simply ignore the protocol 2022-11-18 21:19:35 -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
5fc685aade
remove unused async 2022-11-18 20:32:00 -05:00
David Reed
8f999e7236
prettier 2022-11-18 20:00:58 -05:00
David Reed
7b739260f0 remove async from handler, explicitly expose __uvHook 2022-09-15 17:14:19 -04:00
David Reed
471f591ab0 import core scripts from ultraviolet-core 2022-09-15 17:12:58 -04:00