Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: <webview> app-manifest-updated event #10169
I'd like to propose a new event which is dispatched when a web app manifest link relation changes:
...as defined by W3C Web App Manifest specification and used by modern progressive web apps.
The payload of the event could simply be the URL of the manifest as with icon link relations, or it could be the manifest JSON content itself with Electron responsible for fetching the manifest in a fully spec compliant way (e.g. using the correct browsing context and supporting HTTP authenticated manifests etc).
For prior art, see the vendor-prefixed
The use case of this event is to detect when the current web page is part of a web app that can be installed, and use the manifest metadata to install the web app into a web app runtime.
The event name could be different to what I propose here, but note that a web app manifest applies to a whole web app or website which may consist of multiple pages, it it not strictly page metadata in the way that a
I had a play around using a
FWIW I had the same issue when I implemented the W3C web app manifest support in the Firefox browser in Firefox OS. I initially tried to implement it in the app itself but we eventually realised manifest fetching had to be implemented at the platform level to be fully spec compliant.
I did a quick dive into the Chromium logic that managers the app manifest and it looks like behind the scenes their may be something we can hook in to. But it isn't exposed in as nice a way as other renderer events