Nonsensical error when trying to do basic notifications in Firefox, as per their own example code

by guestghost   Last Updated October 10, 2019 02:01 AM - source

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:

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...

Tags : firefox

Related Questions

Remove or add items to firefox open menu

Updated March 22, 2019 00:01 AM