webextension-polyfill/test/fixtures/runtime-messaging-extension/content.js

10 lines
280 B
JavaScript
Raw Normal View History

const {name} = browser.runtime.getManifest();
console.log(name, "content script loaded");
browser.runtime.sendMessage("content script message").then(reply => {
console.log(name, "content script received reply", {reply});
});
console.log(name, "content script message sent");