Feature request: <webview> app-manifest-updated event
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 873
Description
The Electron `` has events for notifying its parent when web page metadata changes including:
* `page-title-updated` for `` 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](https://www.w3.org/TR/appmanifest/) 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](https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowsermanifestchange) 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.
Contributor guide
Research direction
Review Electron's existing metadata events, especially page-title-updated, page-favicon-updated, and did-change-theme-color, along with the Web App Manifest specification and Gecko's mozbrowsermanifestchanged event. Define the event's payload and dispatch behavior for manifest link changes, including the manifest-fetching responsibilities, before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- api, desktop, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100