Closed Bug 1213620 Opened 4 years ago Closed 4 years ago

DownloadsButton defined as const so extensions can't access it

Categories

(Firefox :: Downloads Panel, defect)

44 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 44
Tracking Status
firefox44 --- fixed

People

(Reporter: sparky, Assigned: sparky)

References

Details

(Keywords: addon-compat)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20151009030230

Steps to reproduce:

Trying to access DownloadsButton or window.DownloadsButton, from within an extensions XUL overlay, is undefined.

This prevents extension from interacting with the download panel anchor. For example, Status4Evar uses DownloadsButton to conditionally swap out the panel's anchor, which is not possible using DownloadsIndicatorView if "downloads-button" isn't on a toolbar.

Other components of the download button/indicator/panel use XPCOMUtils.defineConstant or similar, but DownloadsButton does not.
Blocks: 1202902
Keywords: addon-compat
OS: Unspecified → All
Hardware: Unspecified → All
Fancy creating a patch?
Component: Untriaged → Downloads Panel
Flags: needinfo?(sparky)
Summary: DownloadsButton defined as const so extensions can't access → DownloadsButton defined as const so extensions can't access it
I suppose there's a first time for everything. I verified this my modifying my local omni.js instead of compiling, so hopefully that's sufficient.
Flags: needinfo?(sparky)
Assignee: nobody → sparky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8672419 [details] [diff] [review]
bug1213620-DownloadsButton-global.patch

Thanks, LGTM!
Attachment #8672419 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/dad706141d03
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
You need to log in before you can comment on or make changes to this bug.