New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature detect request: Web App Manifest (PWA Support) #2305
Comments
Looking at the spec, would: Modernizr.addTest("webappmanifest","BeforeInstallPromptEvent" in window) work? If so, that's like 50% of an easy PR for someone right there. |
Thanks for the help! I've started a Codepen tracking my aims and tests - unfortunately as you'll see from the results there, testing this pen based on your suggestion resulted in a false negative from Safari on iOS 11.3 - according to this tweet from a Safari engineer, Web App Manifest is supported there. I'm assuming this is because while Safari on iOS 11.3 will consult the web app manifest, it doesn't support BeforeInstallPromptEvent. Potentially, I could combine that first test (BeforeInstallPromptEvent) with a check for Service Worker support (already in Modernizr) and some kind of horrible test specifically for Safari on iOS 11.3 and later, but if you have any nicer ideas I'd love to hear them. |
It is problematic to use Technically, to detect just the manifest support in any form (including the most basic ones), one should check if See the whole discussion here: NOtherDev/whatwebcando#36. |
Looking to be able to combine feature detection for service workers — already in Modernizr — with a test for whether the browser supports / cares about the Web App Manifest, so as to progressively disclose the existence of PWA features to the user.
Example: A user on the 'my account' page of a membership portal who is on iOS 11.3 or later sees a promotion block about our new virtual membership card added to their home screen as a standalone PWA, but a user on iOS 11.2 or earlier - which does not support basic PWA features - does not see the promotion block for something their browser doesn't support.
Thanks!
The text was updated successfully, but these errors were encountered: