Closed
Bug 919568
Opened 11 years ago
Closed 11 years ago
Multiple CustomEvent breaks
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.14
People
(Reporter: patilkr24, Unassigned)
Details
CustomEvent is invoked only once. To communicate from unprivileged page to privilege page When CustomEvents are used then it is invoked only once. CustomEvent (event name = downloadReport) Dispatch is implemented at: https://github.com/patilkr/CustomEventError/blob/master/data/securityReport.js#L69 and CustomEvent Listener: https://github.com/patilkr/CustomEventError/blob/master/lib/securityReportUI.js#L52 Only the first time dispatch of CustomEvent invoked Listener. In similar fashion of 2nd CustomEvent (Event name = addon-meesage) is added: 2nd CustomEvent dispatch and Listener. https://github.com/patilkr/CustomEventError/blob/master/data/securityReport.js#L63 https://github.com/patilkr/CustomEventError/blob/master/lib/securityReportUI.js#L58 Listener of "addon-message" CustomEvent is invoked multiple times as long as "downloadReport" CustomEvent is not triggered. But after first use of "downloadReport" CustomEvent, both event stops working and no error is reported in error console.
Component: Developer Tools → General
Product: Firefox → Add-on SDK
Target Milestone: --- → 1.14
Version: 23 Branch → unspecified
The error was caused because the listener was not there for second time dispatch of CustomEvent. It was because the CustomEvent dispatch from UI occurs through a anchor element that reload the developer tools UI page. Therefore, listener function is not available for CustomEvent dispatch. It's not a FF bug rather it was a problem in the sample code.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•