Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send message not working: content-script <---> dom (Manifest v3) #12974

Closed
rstoenescu opened this issue Mar 29, 2022 Discussed in #12947 · 1 comment
Closed

Send message not working: content-script <---> dom (Manifest v3) #12974

rstoenescu opened this issue Mar 29, 2022 Discussed in #12947 · 1 comment
Assignees

Comments

@rstoenescu
Copy link
Member

Discussed in #12947

Originally posted by mdedirudianto March 27, 2022
I tried new version of Quasar CLI BEX using manifest v3. It looks like that connection between content-script and dom has broken. Working fine with older version of Quasar webpack and BEX manifest v2. Please find my codes below to test

dom.js:

console.log('dom file')

export default function (bridge) {
  console.log('attach dom bridge')

  bridge.on('test', d => {
    console.log('test from content', d.data)
  })

  console.log('send dom ready')
  bridge.send('dom-ready', { dom: true })
}

my-content-script.js

console.log('content file')

export default function (bridge) {
  console.log('attach content')

  setInterval(async () => {
    console.log('send test to dom');
    await bridge.send('test', { test: true });
  }, 5000);

  bridge.on('dom-ready', (event) => {
    console.log('content dom-ready', event.data);
  })
}

No message received on both side. Is there anything I missed?

@rstoenescu
Copy link
Member Author

Fix will be available shortly in q/app-vite 1.0.0-beta.10 and q/app-webpack 3.4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant