fix(api/latica): allow PeerProxy create in Worker
what
removes window reference and ensure worker spawned with full URL to allow using socket:network api from a Worker
why
so that I can setup network connections from Worker context
note
⚠️ PR against next
LGTM. I want to check my understanding here though: So this says that instead of creating a worker for the window, it creates it for the global object? And rather than using pathname from import.meta.url your specifically getting the href? I'm unclear on the difference there
Read about globalThis here ... globalThis is sometimes the window, sometimes self, etc
"pathname" is relative, "href" is absolute ... worker's don't have a concept of relative, so needs to be absolute
we fixed this in next and we actually handle relative paths for you in the Worker implementation :)