-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Labels
TPAC2025Topics for discussion at TPAC 2025Topics for discussion at TPAC 2025
Description
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:
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
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
let manifest;
try {
manifest = await document.getManifest({excludeDefaultManifest: true});
} catch (e) {
// handle network error, parsing error, etc.
}
if (manifest != null) {
console.log(manifest.id);
}
diekus
Metadata
Metadata
Assignees
Labels
TPAC2025Topics for discussion at TPAC 2025Topics for discussion at TPAC 2025