- From: Daniel Murphy <notifications@github.com>
- Date: Mon, 07 Jul 2025 09:44:21 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 7 July 2025 16:44:25 UTC
dmurph created an issue (w3c/manifest#1179) Devs want to be able to fetch the document's current manifest state, and possible get other metadata, for production code & testing. Some possible ideas: ```js let manifest; try { manifest = await document.getManifest(); } catch (e) { // handle network error, parsing error, etc. } console.log(manifest.id); // Is metadata needed? let metadata = manifest.getMetadata(); // The manifest is always populated with defaults console.log(metadata.isDefaultManifest); ``` or maybe ```js let data; try { data = await document.getManifest(); } catch (e) { // handle network error, parsing error, etc. } let manifest = data.manifest; console.log(manifest.id); let metadata = data.metadata; let isDefault = metadata.isDefault; ``` or maybe ```js let manifest; try { manifest = await document.getManifest({excludeDefaultManifest: true}); } catch (e) { // handle network error, parsing error, etc. } if (manifest != null) { console.log(manifest.id); } ``` -- Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/1179 You are receiving this because you are subscribed to this thread. Message ID: <w3c/manifest/issues/1179@github.com>
Received on Monday, 7 July 2025 16:44:25 UTC