Closed Bug 874054 Opened 11 years ago Closed 7 years ago

Notification constructor does not supports adding handlers for its events

Categories

(Core :: DOM: Device Interfaces, defect)

22 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sokoldv, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130512 Firefox/22.0 (Nightly/Aurora)
Build ID: 20130512004015

Steps to reproduce:

Call : 
var n = new Notification('title', {onshow:function () {console.log('Hello, World!')}});
var n2 = new Notification('title2');
n2.onshow = function () {console.log('Hello from n2')};


Actual results:

2 notifications showed. And logged text 'Hello from n2'.


Expected results:

2 notification showed and logged 2 texts 'Hello, World!', 'Hello from n2'
Component: Untriaged → DOM
Product: Firefox → Core
Warning: calling these STR in Firefox 24 crashes the browser, see bug 874090.
Component: DOM → DOM: Device Interfaces
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.