Help needed In API call from extension
I am building and extension with plasmo I have one csui where I have all my code. I want to sent a request to my server, after finding it I found that messaging can be used for that
my structure look like
|---contents/
| |--App.tsx
|---background/
| |--messages/
| |--ping.ts
I am sending api requests from
ping.ts
and using the below approach
now for this i have to send my extension id but this id will be diffrent if i build and install it in diffrent browser, how to overcome this issue? Please some one help me3 Replies
you can use
(globalThis.browser || globalThis.chrome).runtime.id
to get itThank you buddy, it solved my problem
Gave +1 Rep to @filthytone (current:
#5
- 9
)