Closed
Bug 1098470
Opened 10 years ago
Closed 10 years ago
navigator.hasFeature() returns undefined for manifest.*
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: mat, Assigned: reuben)
References
Details
(Whiteboard: [dependency: marketplace])
Attachments
(2 files)
12.75 KB,
application/zip
|
Details | |
2.22 KB,
patch
|
ehsan.akhgari
:
review+
bajaj
:
approval-mozilla-b2g34+
|
Details | Diff | Splinter Review |
According to https://wiki.mozilla.org/WebAPI/Navigator.hasFeature, from a privileged app with the 'feature-detection' permission, I should be able to use hasFeature() to detect 'manifest.precompile' support. It doesn't work. Try:
navigator.hasFeature('manifest.precompile').then(function(data) { console.log(data); });
Expected result:
true
Actual result:
undefined
Attaching a small privileged app exhibiting the issue. Pushing and running it with WebIDE should display a green table, but all the manifest.* rows are red instead.
Interestingly, through hasFeature() fails, getFeature() works for manifest.*, but then the table results are inverted: all api.* return undefined for getFeature(), manifest.* return true.
Comment 1•10 years ago
|
||
[Blocking Requested - why for this release]:
Ehsan, can you confirm that the implementation [1] differs from the design?
Reuben, would you have time to take a look at this, as you did the initial work?
[1]: http://dxr.mozilla.org/mozilla-central/source/dom/base/test/test_getFeature_with_perm.html#98
Flags: needinfo?(reuben.bmo)
Flags: needinfo?(ehsan.akhgari)
Comment 2•10 years ago
|
||
[Blocking Requested - why for this release]: The getFeature implementation differs from its original design, which needs to be fixed.
blocking-b2g: --- → 2.1?
Assignee | ||
Comment 3•10 years ago
|
||
The documentation is kind of confusing on this one. GetFeature and HasFeature were split up, and so far HasFeature only covers the api.* namespace. For manifest.*, you need to use GetFeature. I'm pretty sure this is INVALID.
Flags: needinfo?(reuben.bmo)
Assignee | ||
Comment 4•10 years ago
|
||
(See bug 1009645 comment 76 and the comments after that.)
Assignee | ||
Comment 5•10 years ago
|
||
Oh, I see. _That's_ the bug. The wiki makes more sense than the code. Sorry for the noise.
Attachment #8523302 -
Flags: review?(ehsan.akhgari)
Updated•10 years ago
|
Assignee: nobody → reuben.bmo
blocking-b2g: 2.1? → 2.1+
Updated•10 years ago
|
Flags: needinfo?(ehsan.akhgari)
Attachment #8523302 -
Flags: review?(ehsan.akhgari) → review+
Comment 6•10 years ago
|
||
Reuben, can you please add tests for this? Thanks!
Assignee | ||
Comment 7•10 years ago
|
||
Thanks for the review!
https://hg.mozilla.org/integration/b2g-inbound/rev/24b10dc8139d
Comment 8•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 9•10 years ago
|
||
Please request b2g34 approval on this patch when you get a chance.
status-b2g-v2.1:
--- → affected
status-b2g-v2.2:
--- → fixed
status-firefox35:
--- → wontfix
status-firefox36:
--- → wontfix
status-firefox37:
--- → fixed
Flags: needinfo?(reuben.bmo)
Flags: in-testsuite?
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8523302 [details] [diff] [review]
Move manifest.* scope from navigator.getFeature to navigator.hasFeature
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 900241
User impact if declined: Throws app developers a curve ball, implementation doesn't match API in weird ways.
Testing completed: Automated tests, patch has been in central for a week.
Risk to taking this patch (and alternatives if risky): None.
String or UUID changes made by this patch: None.
Flags: needinfo?(reuben.bmo)
Attachment #8523302 -
Flags: approval-mozilla-b2g34?
Updated•10 years ago
|
Attachment #8523302 -
Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
Comment 11•10 years ago
|
||
Flags: in-testsuite? → in-testsuite+
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•