You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I need to send and receive content script messages with .vue files and vice versa.
But whenever I try, I can't make my content script communicate with the .vue, and I even tried options, and I get the same error:
For others that may run into a similar error, you may simply need to check that your sendMessage / onMessageimport statements specify the right "endpoints" since these endpoints indicate the source and destination of each message according to webext-bridge's documentation.
i.e. within e.g. src/contentScripts/views/Sample.vue
import{ ... }from'webext-bridge/content-script'
While in your background script(s) it'll be:
import{ ... }from'webext-bridge/background'
and so on (other endpoints are popup, options, devtools and window)
Looks like you made your imports correctly @capoia . Do you think the error could've come up because you send the message in contentScripts/index.tsbefore the listener gets registered in contentScripts/App.vue (since the vue app is only initialized many lines after the sendMessage() call)?
Describe the bug
Hello, I need to send and receive content script messages with .vue files and vice versa.
But whenever I try, I can't make my content script communicate with the .vue, and I even tried options, and I get the same error:
Reproduction
https://stackblitz.com/edit/github-hcxykr
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: