Closed Bug 1216207 Opened 9 years ago Closed 9 years ago

Expose support for late-customization using `navigator.hasFeature()`

Categories

(Firefox OS Graveyard :: General, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.5+, firefox44 fixed)

RESOLVED FIXED
FxOS-S10 (30Oct)
blocking-b2g 2.5+
Tracking Status
firefox44 --- fixed

People

(Reporter: ddurst, Assigned: _AtilA_)

References

Details

(Whiteboard: systemsfe)

Attachments

(1 file, 3 obsolete files)

In looking at the late customization feature, we realized that on the consumer side the only way to limit it to 2.5+ was to use hasFeature("web-extensions") -- the methodology we're using to identify 2.5 via add-ons support -- but we determined that that's lousy. We don't want to infer a version from the support of something else. Instead, we could just say if "late-customization" is supported. CCing sfoster, in case this would also change things on his side. Marking as P1 because of time-sensitivity.
What would constitute support? Perhaps the presence of a truthy value for the latecustomization.url mozSetting?
Blocks: 1198031
I think that would be enough, yes. Most hasFeature() flags are hardcoded (the important point being that older devices don't have the hardcoded value and therefore don't return true)
... this is like the previous web-extensions feature check but with the proper name, should be enough.
Assignee: nobody → jgomez
Attachment #8677570 - Attachment is obsolete: true
Attachment #8677591 - Flags: review?(overholt)
Attachment #8677570 - Flags: review?(ehsan)
Attachment #8677591 - Flags: review?(overholt) → review?(ehsan)
Comment on attachment 8677591 [details] [diff] [review] Expose late-customization feature This needs a test in test_hasFeature.html. Also, please submit patches with 8 lines of context in the future. Thanks!
Attachment #8677591 - Flags: review?(ehsan) → review-
Attachment #8677570 - Flags: review?(ehsan)
Slightly modified the test to make easy add new future features.
Attachment #8677591 - Attachment is obsolete: true
Attachment #8678816 - Flags: review?(ehsan)
Comment on attachment 8678816 [details] [diff] [review] Add late-customization feature detection and unit test Review of attachment 8678816 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/test/test_hasFeature.html @@ +64,5 @@ > if (!b2gOnly) { > return Promise.resolve(); > } > > + var builtInFeatures = [ nit: trailing whitespace. @@ +66,5 @@ > } > > + var builtInFeatures = [ > + {feature: "web-extensions", value: true}, > + {feature: "late-customization", value: true} here too
Comment on attachment 8678816 [details] [diff] [review] Add late-customization feature detection and unit test Review of attachment 8678816 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the trailing whitespaces fixed.
Attachment #8678816 - Flags: review?(ehsan) → review+
Attachment #8678816 - Attachment is obsolete: true
Attachment #8679182 - Flags: review?(ehsan)
Comment on attachment 8679182 [details] [diff] [review] Add late-customization feature detection and unit test (v2) Whitespace corrected, carrying ehsan's r+
Attachment #8679182 - Flags: review?(ehsan) → review+
blocking-b2g: --- → 2.5+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S10 (30Oct)
No longer blocks: 1198031
Blocks: 1219285
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: