Open lionelhorn opened 8 months ago
Interesting, I would have expected it to not error out when passing a function, but for the function to silently be removed from the response.
I'll see if I can figure out why a response isn't returned in this case and improve the error message.
First, many thanks to the contributors ! Nice project and utils 👍
I'm using a content script in main world context to dynamically extract "react props" from the whole dom tree for use in another content script not running in main world context.
In console logs the following abreviation stands for MW: Main World CS: Content Script
Messenger caller is in a CS without MW context
Failing: with error thrown but error message doesn't explain why
No response
Error message just says
The issue is that the return value object contains a function.
Example simplified code :
Working: messenger func returns with value
Solution
Return value can be sanitized. An error message from
@webext-core/messaging
explaining why it doesn't return would be nice