I'm converting my extensions and I've noticed that no reply is being send when I send message between different contexts of my extension.
Steps to reproduce:
1) open background script console and execute:
2) open extension page and in the console execute this:
Background console will correctly print "hello" but the extension page won't receive the reply "ok".
Is sending responses from runtime.onMessage handler not supported in Safari?
MDN: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage
Steps to reproduce:
1) open background script console and execute:
Code Block browser.runtime.onMessage.addListener(x => { if (x === 'hello') { console.warn(x); return Promise.resolve('ok'); } });
2) open extension page and in the console execute this:
Code Block await browser.runtime.sendMessage('hello');
Background console will correctly print "hello" but the extension page won't receive the reply "ok".
Is sending responses from runtime.onMessage handler not supported in Safari?
MDN: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage