Open edishu opened 1 year ago
I've figure out how to send message from extension to content script. I've opened this PR https://github.com/PlasmoHQ/examples/pull/31 in examples repository with the solution.
This is a crucial use case that is extremely common but doesn't feel well enough documented. Thanks for your solution!
Hey I am really confused and thought to ask here as it's the closest to my use case. This covers receiving response into a Contents Script UI. How do I receive response into a conventional content script? Like the one mentioned in these docs: https://docs.plasmo.com/framework/content-scripts
My use case is to read the DOM through a Content script when the popup asks it. Based on what it reads, send some info back to popup as response. Have no clue what APIs exist for this use case.
Any help is appreciated!
Hey I am really confused and thought to ask here as it's the closest to my use case. This covers receiving response into a Contents Script UI. How do I receive response into a conventional content script? Like the one mentioned in these docs: https://docs.plasmo.com/framework/content-scripts
My use case is to read the DOM through a Content script when the popup asks it. Based on what it reads, send some info back to popup as response. Have no clue what APIs exist for this use case.
Any help is appreciated!
Same - I need to figure out how to launch a CSUI from a popup
What is the example you wish to see?
I want to see an example where I can send message from extension popup to content script. For example:
Is there any context that might help us understand?
I'm trying to create a regex finder, which a user can input regular expression to find matches on webpage. All examples of messaging I have found use service worker. However, direct messaging between extension and content scripts should be possible for cases like this.
Code of Conduct