Closed Bug 743032 Opened 13 years ago Closed 6 years ago

mozApps.mgmt EventListener mechanism not implemented as expected

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: onecyrenus, Unassigned)

References

Details

navigator.mozApps.mgmt.addEventListener navigator.mozApps.mgmt.removeEventListener Are not implemented currently as they are in the html5 / js implementation, and the android implementation. navigator.mozApps.mgmt.oninstall = function() {}; navigator.mozApps.mgmt.onuninstall = function () {};
Depends on: 731746
Summary: mozApps.mgmt EventListener mechansim not implemented as expected → mozApps.mgmt EventListener mechanism not implemented as expected
OS: Mac OS X → All
Hardware: x86 → All
(In reply to dclarke@mozilla.com from comment #0) > navigator.mozApps.mgmt.addEventListener > navigator.mozApps.mgmt.removeEventListener > > Are not implemented currently as they are in the html5 / js implementation, > and the android implementation. > > navigator.mozApps.mgmt.oninstall = function() {}; > navigator.mozApps.mgmt.onuninstall = function () {}; Can you be a bit more specific?
https://developer.mozilla.org/en/OpenWebApps/The_JavaScript_API#Management_API_%28navigator.mozApps.mgmt.*%29 Management API (navigator.mozApps.mgmt.*) The apps management API is privileged. It is intended to grant access to trusted pages, also called "dashboards". The management API exposes functions that let dashboards manage and launch apps on a user's behalf. Additionally, the API exposes functions for app sync, which lets the dashboard display the logged-in state of the user and allows the user to sign up or register for an account to synchronize apps across devices. navigator.mozApps.mgmt.getAll() navigator.mozApps.mgmt.addEventListener(type, cb) navigator.mozApps.mgmt.removeEventListener(type, cb) addEventListener / removeEventListener aren't really there.. :( There might be an argument that is to be made about whether they should be, but since it was documented as such, that was my expectation.
Yeah, navigator.mozApps.mgmt should definitely be an EventTarget. It just wasn't clear from comment 0 that the problem was that they were missing. There are ways to implement this in JS (see attachment 600293 [details] [diff] [review]), but it's not possible to fully mimic the right event semantics, so this blocked on bug 731746.
Whiteboard: [mozApps API 1.0]
The problem we have here is we have to come to an agreement as to how the api should behave.
The expected behavior is clear (addEventListener and removeEventListener should just work). Once bug 731746 is fixed we'll progress here.
There are two options. #1) We can fix and land on FF 14 - No need to update MDN #2) We cannot fix and land on FF 14 - A need to update MDN to remove add / remove EventListener Currently there is no eta, so it is unclear what should be done
You should do #2 for now, and update the doc once the code will be ready.
Blocks: 746465
Whiteboard: [mozApps API 1.0]
I removed add/remove EventListener pages from the MDN docs. They can be added back in later if this bug gets resolved.
No longer blocks: 746465
Component: DOM: Mozilla Extensions → DOM: Apps
Bug 731746 has long been fixed. What's next here?
We'll get that from bug 899322
Depends on: 899322
Product: Core → Core Graveyard
Core Graveyard / DOM: Apps is inactive. Closing all bugs in this component.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.