Dear community,
Question:
Is there a way for the window message manager to detect, that the message was sent from the tab belonging to this window?
Description:
Suppose we have 3 windows A, B and C.
Each window has tabs e.g. window A has tabs A1, A2, A3, window B has tabs B1, B2, and B3 and window C has tabs C1, C2, and C3
According to the docs, each window has its own message manager, so when the content script from the tab B1 sends a message via sendAsyncMessage(), all the message managers (A, B and C) receive this message, and this is not good approach for my code.
What is the best way to organize messaging, so the messages from tabs A1, A2, … are processed only by the message manager A, messages from tabs B1, B2, …- by the message manager B, and so on?
For each message we have a field message.target.messageManager - can this help me?