Files
webextensions-examples/export-helpers/background.js
wbamberg b269b12a61 Add an example of how to use export helpers in content scripts (#86)
* Added example of using export helpers

* stop using wrapedJSObject with exportFunction; remove createObjectIn

* Updated for review comments

* Fix content_scripts 'matches' property
2017-10-23 16:21:24 -07:00

11 lines
257 B
JavaScript

/**
* Show a notification when we get messages from the content script.
*/
browser.runtime.onMessage.addListener((message) => {
browser.notifications.create({
type: "basic",
title: "Message from the page",
message: message.content
});
});