trpc-chrome
trpc-chrome copied to clipboard
Feature/window-link
Hey! Nice project, it's quite helpful especially combined with plasmo
Plasmo has the concept of "injecting into the main world" or how I like to call it "inpage scripts", which allow the extension to access the global objects used by a webpage, and escapes from the isolation content scripts usually run in. https://docs.plasmo.com/framework/content-scripts#injecting-into-the-main-world
I added a link called windowLink
and a relayer called relay
to the package. Heavily inspired by how @plasmohq/messaging
works.
In the process I found a bug with your chromeLink implementation for subscriptions, where the stop message would not be send (unsub before sending). Fixed that in the process, and covered that case with tests.
This is awesome! I'd love to try using this :)
@jqphu Iām using it myself, it works great!
@jlalmes promised me to have a look at the PR as soon as he can find some time š Happy eastern š„š°
wtf thats fantastic