From ba15c4360a7440db168f9de9bfafe731402e8d4e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 7 Jun 2021 05:41:56 +0000 Subject: [PATCH] Actually support the manifest property --- src/install-button.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/install-button.ts b/src/install-button.ts index 7637bcd..bc0be93 100644 --- a/src/install-button.ts +++ b/src/install-button.ts @@ -1,6 +1,8 @@ class InstallButton extends HTMLElement { public static isSupported = "serial" in navigator; + public manifest?: string; + public eraseFirst?: boolean; private renderRoot?: ShadowRoot; @@ -26,7 +28,7 @@ class InstallButton extends HTMLElement { }); this.addEventListener("click", async (ev) => { ev.preventDefault(); - const manifest = this.getAttribute("manifest"); + const manifest = this.manifest || this.getAttribute("manifest"); if (!manifest) { alert("No manifest defined!"); return;