Closed Bug 1178856 Opened 9 years ago Closed 9 years ago

Expose add-ons API using `navigator.hasFeature()`

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.5+, firefox43 fixed)

RESOLVED FIXED
FxOS-S6 (04Sep)
feature-b2g 2.5+
Tracking Status
firefox43 --- fixed

People

(Reporter: drs, Assigned: edgar)

References

Details

Attachments

(1 file)

Marketplace would like to be able to detect whether or not a user's device supports add-ons. If they're not supported, we won't let the user install add-ons.
Blocks: addons25
blocking-b2g: --- → 2.5+
Hi Hsinyi, can you find someone in your team to work on this bug? Thanks.
Flags: needinfo?(htsai)
Talking with Edgar, he is willing to take. Thank you :)
Assignee: nobody → echen
Flags: needinfo?(htsai)
There are three namespaces (hardware, api, manifest) in feature detection API [1]. But add-on seems not belong to any of them. So I propose to have a new namespace called `addon` and only available on b2g. Then Marketplace can use `navigator.hasFeature('addon')` to detect whether the device supports add-ons. And also we can extend it to detect more features where needed, e.g. `navigator.hasFeature('addon.foo.bar')`.

How does this sound?

Thank you.

[1] https://wiki.mozilla.org/WebAPI/Navigator.hasFeature
Flags: needinfo?(jonas)
Flags: needinfo?(fabrice)
I would use 'extensions' instead of 'addons' to match the code maybe, but no big deal. Naming is hard :)
Flags: needinfo?(fabrice)
Extensions are a type of add-on (others being themes, dictionaries, language packs, search engines).  If this is specifically extensions, let's definitely use that name.

Edgar:  what's your timeline for this?  The marketplace needs this to land before it can make the 2.5 package blocking other bugs (like bug 1155585).  Thanks.
I would even go with "web-extensions" since it's the "official" name for the new extensions.
Blocks: 1198031
(In reply to [:fabrice] Fabrice Desré from comment #6)
> I would even go with "web-extensions" since it's the "official" name for the
> new extensions.

Sounds good, I will go with "web-extensions", thank you.

(In reply to Wil Clouser [:clouserw] from comment #5)
> Extensions are a type of add-on (others being themes, dictionaries, language
> packs, search engines).  If this is specifically extensions, let's
> definitely use that name.
> 
> Edgar:  what's your timeline for this?  The marketplace needs this to land
> before it can make the 2.5 package blocking other bugs (like bug 1155585). 
> Thanks.

I am going to start working on this and plan to land it by end of this sprint. Thank you.
Target Milestone: --- → FxOS-S6 (04Sep)
It's my understanding that we don't need this. Please hold off until tomorrow and I can confirm/deny.
blocking-b2g: 2.5+ → ---
feature-b2g: --- → 2.5+
See Also: → 1200377
Countermanding #c8, please proceed.
Bug 1178856 - Create an API for detecting web-extensions support on b2g. r?fabrice
Attachment #8655271 - Flags: review?(fabrice)
Comment on attachment 8655271 [details]
MozReview Request: Bug 1178856 - Create an API for detecting web-extensions support on b2g. r?fabrice

https://reviewboard.mozilla.org/r/17905/#review16083

::: dom/base/Navigator.cpp:1602
(Diff revision 1)
> +#ifdef MOZ_B2G

I'm not convinced this needs to be guarded by MOZ_B2G since we also have support on firefox desktop.
Attachment #8655271 - Flags: review?(fabrice)
Comment on attachment 8655271 [details]
MozReview Request: Bug 1178856 - Create an API for detecting web-extensions support on b2g. r?fabrice

https://reviewboard.mozilla.org/r/17905/#review16125
Attachment #8655271 - Flags: review+
Thank you, Fabrice.
Flags: needinfo?(jonas)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c2199af05488
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Blocks: 1222254
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: