Closed Bug 1596040 Opened 5 years ago Closed 4 years ago

Link relList support returns false for manifest

Categories

(GeckoView :: General, defect, P2)

68 Branch
defect

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: me, Assigned: marcosc)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36

Steps to reproduce:

We're trying to detect the "A2HS" (Add to Home Screen) support.

For our PWA is crucial to promote the installation when the feature is supported (either manual or app triggered).

As far as we know, the only reliable way is to check the result of the following:

document.createElement('link').relList.supports('manifest');

Actual results:

It returns false.

Expected results:

Expected true.

Moving this to GeckoView for triage. It is unlikely we will fix this for Fennec, but if this is also an issue in FIrefox Preview (Fenix) then we can get it on the roadmap there.

"me" - are you able to check this bug on Firefox Preview?

Component: Web Apps (PWAs) → General
Product: Firefox for Android → GeckoView
Version: Firefox 68 → 68 Branch
Flags: needinfo?(me)

James says it likely needs DOM work. :marcosc, can you take a look please?

Flags: needinfo?(mcaceres)

Sorry for the delay. Will take it.

Flags: needinfo?(mcaceres)
Assignee: nobody → mcaceres
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Summary: manifest: feature detection returns false → Link relList support returns false for manifest

Fenix wants to ship Web Manifest support, while other Firefox products (e.g., Desktop) don't support it.

With the pref enabled, developers can check, via link.relList.supports(), if manifest processing is supported by a particular product.

Try is happy:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b5f5ae44fab7ee86fd904d446cdd872e49fdbab6

But needs a rebase... and that means doing it on a different computer. Oh Phabricator... le sigh.

Pushed by mcaceres@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37e5dfd85236
Teach HTMLLinkElement's relList about 'manifest' r=bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Thanks!!! 🦊😻

Flags: needinfo?(me)

Just a note for anyone landing here: link.relList.supports("manifest") will only return true on a product-by-product basis (conditional on the product actually doing something useful with web manifest)... so initially, only Firefox Preview will return "true" (bug 1603673) - but all other Firefoxes will return false.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: