[Webkit-unassigned] [Bug 198673] Need to way to feature-detect for "Add to home screen" instructions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 21 03:47:29 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=198673

--- Comment #15 from Nicolas Hoizey <nicolas at hoizey.com> ---
(Copy/pasting part of a comment I made on https://bugs.webkit.org/show_bug.cgi?id=255716 which is now closed.)

I think we don't need the `beforeinstallprompt` event at all, whatever the other enhancements in webkit/Safari, looking at how Chrome(ium?) made it instant now anyway, with almost no user engagement anymore.

However, it would be great if we could provide a way for developers to trigger the UA-provided install UI and a property to know if it makes sense right now to add content and a button in the page for this feature.

Like `Notification.permission` tells us if the user already granted/denied notifications (or didn't yet), `AddToHomeScreen.possible` would tell us if A2HS is possible (not already added to home screen for example, and Chrome could add constrainsts about Manifest values).

And like `Notification.requestPermission()` allows asking the user for such permission, `AddToHomeScreen.requestPermission()` (and a user gesture) would trigger the UA-provided install UI (the same that would be triggered by the ambiant badging icon/button and A2HS in the share sheet).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230421/46f22820/attachment.htm>


More information about the webkit-unassigned mailing list