trpc-chrome icon indicating copy to clipboard operation
trpc-chrome copied to clipboard

Feature/window-link

Open janek26 opened this issue 1 year ago ā€¢ 3 comments

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.

janek26 avatar Mar 29 '23 05:03 janek26

This is awesome! I'd love to try using this :)

jqphu avatar Apr 07 '23 08:04 jqphu

@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 šŸ„ššŸ°

janek26 avatar Apr 07 '23 08:04 janek26

wtf thats fantastic

blueagler avatar Aug 18 '23 12:08 blueagler