Sync connection between the content script and the background
81 views
Skip to first unread message
Andrey Tamarkin
unread,
Nov 12, 2024, 6:16:08 AMNov 12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions
Hello,
I want to send a sync message from the content script to the background (which means that I want the code in the content script to wait for the response from the background). Is this possible?
Thanks
woxxom
unread,
Nov 12, 2024, 6:39:50 AMNov 12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Andrey Tamarkin
There's no way to send a synchronous message i.e. pause the entire environment of the tab while waiting for the response. If you want to get configuration data at document_start synchronously there are some workarounds. Please describe what specifically you are trying to do in detail or show your code.