Bypass Message API
ヒント
To use the API, connection_isolated
must be set to true in manifest.
bypassMessage
Bypass message reception (chrome.runtime.onMessage.addListener
).
import { bypassSendMessage } from 'crx-monkey';
const listener = bypassMessage((msg) => {
console.log('Receved a message.', msg);
});
listener.remove();
remove()
Ends message waiting
bypassSendMessage
Bypass sending messages (chrome.runtime.sendMessage
).
import { bypassSendMessage } from 'crx-monkey';
bypassSendMessage({ msg: 'Hi' });