Requires --enable-features=InstallElement,
OR enabling about://flags/#web-app-install-element,
OR an origin
trial
header for
InstallElement
A test app and debugging tool for the declarative version of the Web Install API, <install> element. See more info in the Explainer.
We'd love to hear your feedback! To share feedback, please create a GitHub issue.
Expected installresult: success.
Executes:
<install></install>
idExecutes:
<install manifest="https://mustjab.github.io/manifest.json"></install>
manifestIdExecutes:
<install manifest="https://isitchristmas.com/manifest.json" manifestid="https://isitchristmas.com/"></install>
invalid-data Cases: Manifest ID Validation
Version note: In Chromium-based browsers, including
Microsoft Edge and Google Chrome, versions 157 and later report
invalid-data. Use invalid_data when testing
version 156 or earlier.
idExecutes:
<install manifest="https://amandabaker.github.io/pwa/web-install/manifest.webmanifest"></install>
id, mismatched manifestIdExecutes:
<install manifest="https://mustjab.github.io/manifest.json" manifestid="mismatched-manifest-id"></install>
id, mismatched manifestIdExecutes:
<install manifest="https://amandabaker.github.io/pwa/web-install/manifest.webmanifest" manifestid="mismatched-manifest-id"></install>
Expected installresult: invalid-data.
Executes:
<install manifest="badurl"></install>
Executes:
<install manifest=12345 manifestid="https://isitchristmas.com/"></install>
manifestIdExecutes:
<install manifest="https://isitchristmas.com/manifest.json" manifestid=67890></install>
Executes:
<script>const numUrl = 99999;</script>
<install id="installVarNumberUrl" manifestid="https://isitchristmas.com/"></install>
<script>document.getElementById('installVarNumberUrl').setAttribute('manifest', numUrl);</script>
manifestId variable is a numberExecutes:
<script>const numManifest = 88888;</script>
<install id="installVarNumberManifest" manifest="https://isitchristmas.com/manifest.json"></install>
<script>document.getElementById('installVarNumberManifest').setAttribute('manifestid', numManifest);</script>
Executes:
<script>const nullUrl = null;</script>
<install id="installVarNullUrl" manifestid="https://isitchristmas.com/"></install>
<script>document.getElementById('installVarNullUrl').setAttribute('manifest', nullUrl);</script>
manifestId variable is nullExecutes:
<script>const nullManifest = null;</script>
<install id="installVarNullManifest" manifest="https://isitchristmas.com/manifest.json"></install>
<script>document.getElementById('installVarNullManifest').setAttribute('manifestid', nullManifest);</script>
Executes:
<script>let undefinedUrl;</script>
<install id="installVarUndefinedUrl" manifestid="https://isitchristmas.com/"></install>
<script>document.getElementById('installVarUndefinedUrl').setAttribute('manifest', undefinedUrl);</script>
manifestId variable is undefinedExecutes:
<script>let undefinedManifest;</script>
<install id="installVarUndefinedManifest" manifest="https://isitchristmas.com/manifest.json"></install>
<script>document.getElementById('installVarUndefinedManifest').setAttribute('manifestid', undefinedManifest);</script>
The non-nullable IDL property stringifies null, reflects
manifest="null", and resolves it as a relative URL.
Executes:
<install id="installPropertyNullManifest" manifestid="https://isitchristmas.com/"></install>
<script>
const installPropertyNullManifest = document.getElementById("installPropertyNullManifest");
installPropertyNullManifest.manifest = null;
console.log(installPropertyNullManifest.getAttribute("manifest")); // "null"
console.log(installPropertyNullManifest.manifest); // Resolved URL ending in /null
</script>
id, manifestId assigned null
The non-nullable IDL property stringifies null, reflects
manifestid="null", and resolves it as a relative URL.
Executes:
<install id="installPropertyNullManifestId" manifest="https://isitchristmas.com/manifest.json"></install>
<script>
const installPropertyNullManifestId = document.getElementById("installPropertyNullManifestId");
installPropertyNullManifestId.manifestId = null;
console.log(installPropertyNullManifestId.getAttribute("manifestid")); // "null"
console.log(installPropertyNullManifestId.manifestId); // Resolved URL ending in /null
</script>
id, manifestId assigned undefined
The non-nullable manifestId IDL property stringifies
undefined and reflects manifestid="undefined".
The resulting manifest ID does not match the manifest's custom
id.
Executes:
<install id="installUndefinedManifestId" manifest="https://kbhlee2121.github.io/pwa/web-install/manifest.webmanifest"></install>
<script>
const installWithCustomId = document.getElementById("installUndefinedManifestId");
installWithCustomId.manifestId = undefined;
</script>
id, manifestId assigned undefined
Assigning undefined to the non-nullable
manifestId IDL property reflects
manifestid="undefined". The resulting manifest ID does not
match the manifest's default ID.
Executes:
<install id="installUndefinedManifestIdNoCustomId" manifest="https://isitchristmas.com/manifest.json"></install>
<script>
const installWithoutCustomId = document.getElementById("installUndefinedManifestIdNoCustomId");
installWithoutCustomId.manifestId = undefined;
</script>