I'm really at a loss on how do do this. I've looked over chrome's message passing api, but still unclear on how I message between a content script and popup.html (popup.js) I have a content script that's being loaded through background.js via a chrome.tabs.executeScript. I simply want to send a message from the contentscript to a div
<div id="listener"></div>
in popup.html. I have a simple if/else statement in my content script and want to send a message to the div in popup.html when the else is fired.
I'm already using .on listener from jquery which will trigger other functions based on what text is in the listener div, but I'm stuck on message passing.