nerdo
nerdo
PD🧩 Plasmo Developers
Created by nerdo on 5/2/2024 in #🔰newbie
How do I call functions and get the return values from a popup?
I've been trying to put together a simple proof-of-concept for an idea I had to create an extension that could call some functions and get data from a content script running on a page. I can't seem to figure out how to get the communication between the popup and the content script. I keep coming across information that says to either use the underlying chrome.runtime in the content script or use plasmo's messaging, but whenever I try to do any kind of messaging in the content script, I get an error saying that chrome.runtime effectively doesn't exist (trying to access a property of a non-object). Any ideas what I might be doing wrong?
4 replies