The Electron <webview> has events for notifying its parent when web page metadata changes including:
page-title-updated for <title> changes
page-favicon-updated for <link rel=icon> changes
did-change-theme-color for <meta name=theme-color> changes
I'd like to propose a new event which is dispatched when a web app manifest link relation changes:
app-manifest-updated for <link rel=manifest> 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 mozbrowsermanifestchanged event in Gecko's Browser API (similar to Electron's Webview API).
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 <title> is.
The Electron
<webview>has events for notifying its parent when web page metadata changes including:page-title-updatedfor<title>changespage-favicon-updatedfor<link rel=icon>changesdid-change-theme-colorfor<meta name=theme-color>changesI'd like to propose a new event which is dispatched when a web app manifest link relation changes:
app-manifest-updatedfor<link rel=manifest>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
mozbrowsermanifestchangedevent in Gecko's Browser API (similar to Electron's Webview API).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
<title>is.