Skip to content

[Q/A] How to call BGSW from Main world? #684

Answered by louisgv
Anlanther asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot call sendToBackground in main world - the "main world" concept is related to extension sandbox isolation. You will need to either use the relay API or the pub/sub API abstraction to route message from main world to your extension.

Note that the pub/sub API uses externally_connectable feature, which requires a specific website url as a target.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@louisgv
Comment options

@Anlanther
Comment options

@Anlanther
Comment options

Answer selected by Anlanther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #683 on July 14, 2023 10:32.