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);
}
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:
or maybe
or maybe