I get this error:

ReferenceError: browser is not defined

The code:

    browser.notifications.create(123, {  "type": "basic", "title": "testing", "message": "testing body" } );

Exactly as shown on this example page on how to use notifications, by Mozilla: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/notifications/create

No notification pops up. That stupid error is just logged. What?

It's not even a new feature... it's supported since all the way back to Firefox v45. Allegedly. According to the same page with the non-functioning JavaScript code...

New contributor
guestghost is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

guestghost is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.