webextension: how to notify a user from content or background script
36 views
Skip to first unread message
quaz...@gmail.com
unread,
Jul 13, 2016, 5:28:16 PM7/13/16
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I need to be able to alert user from content script.
Right now I am using chrome.notifications.create which works fine in options script but nowhere else.
How can I notify user from content script?
Or if that's not possible, I know how to send a message to the background script ... how would I notify user from there?
Thanks in advance.
Jorge Villalobos
unread,
Jul 13, 2016, 7:13:24 PM7/13/16
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
You can communicate with the background script, which is the one that
has the privileges to notify the user:
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jorge Villalobos, dev-ext...@lists.mozilla.org
I think you asked this in #webextensions too, but for completeness
sake repeating here. It should also work from a background script,
here's an example: