Your question is about the relationship between two content scripts - one script content uploaded to a web page and other script content uploaded to the panel. These content scripts cannot be directly linked, they must exchange data through the extension ( main.js
or some module created by them). In other words: a webpage changes, the content of the script recognizes this change and sends a message to the extension. The extension accepts the message and sends it to the content script in the panel. The contents of the script in the panel then updates the contents of the panel as necessary.
source share