-
Notifications
You must be signed in to change notification settings - Fork 95
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
BeforeInstallPrompt feature #2510
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor issues around names and descriptions, but BCD is giving me a little headache here.
@@ -0,0 +1,12 @@ | |||
name: In-app install experience | |||
description: On browsers that support installing Progressive Web Apps (PWAs), the `beforeinstallprompt` event can be used to defer the browser installation flow until when the user interacts with an in-app install button. | |||
spec: https://wicg.github.io/manifest-incubations/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is pretty interesting. In the course of trying to figure out whether there was a more specific link to use here, I got to wondering why MDN doesn't link to this spec. That turned up these PRs:
- Update beforeinstallpromptevent mdn/content#26828
- BeforeInstallPromptEvent.prompt() is non-standard mdn/browser-compat-data#19910
This puts us in a slightly awkward spot here. BCD shows unqualified support for the API, even where it departs from the spec (because it effectively pretends the spec doesn't exist). We have some options here:
- If we were to link to the spec, we're sort of implying that the Chrome and Edge support for this feature reflects support for this specification.
- Not linking to a specification at all is a difficult alternative (not least of which being that the schema requires it)—what even is the feature, at that point, if we can't point to a definition?
- We could go upstream and unroll some of Will's changes to the compat data, breaking correspondence between MDN content and BCD.
- Override BCD's status.
Or maybe something I haven't thought of yet.
@@ -0,0 +1,12 @@ | |||
name: In-app install experience |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very excited about this name. It's not very specific and it doesn't seem to be widely used (or perhaps used at all) in the existing blog posts and docs about this. I think good alternatives might be (in my order of preference):
- beforeinstallprompt
- App install prompt
- App install prompt event
In any case, the ID would need to change too.
@@ -0,0 +1,12 @@ | |||
name: In-app install experience | |||
description: On browsers that support installing Progressive Web Apps (PWAs), the `beforeinstallprompt` event can be used to defer the browser installation flow until when the user interacts with an in-app install button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: On browsers that support installing Progressive Web Apps (PWAs), the `beforeinstallprompt` event can be used to defer the browser installation flow until when the user interacts with an in-app install button. | |
description: The `beforeinstallprompt` event fires when a Progressive Web App (PWA) is installable, typically on page load in browsers that support installing PWAs. You can use this event to ask users to install within your site, instead of using a generic prompt provided by the browser. |
Learn more: