@pwabuilder/pwainstall
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "@pwabuilder/pwainstall", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/pwa-install.js", |
@@ -530,6 +530,10 @@ import { | ||
} | ||
if (this.deferredprompt === undefined) { | ||
// add listener once more | ||
window.addEventListener('beforeinstallprompt', (event) => this.handleInstallPromptEvent(event)); | ||
} | ||
} | ||
handleInstallPromptEvent(event) { | ||
console.log(event); | ||
this.deferredprompt = event; | ||
@@ -623,3 +627,3 @@ | ||
shouldShowInstall(): boolean { | ||
const eligibleUser = !this.usecustom && this.isSupportingBrowser && this.hasprompt === true; | ||
const eligibleUser = !this.usecustom && this.isSupportingBrowser && this.hasprompt === true || this.isIOS; | ||
console.log('this.deferredprompt', this.deferredprompt); | ||
@@ -684,3 +688,3 @@ console.log('this.isSupportingBrowser', this.isSupportingBrowser); | ||
return html` | ||
${!this.usecustom && this.showopen || this.shouldShowInstall() && this.installed !== true ? html`<button id="openButton" @click="${() => this.openPrompt()}"> | ||
${this.usecustom === false && this.showopen || this.shouldShowInstall() && this.installed !== true ? html`<button id="openButton" @click="${() => this.openPrompt()}"> | ||
<slot> | ||
@@ -687,0 +691,0 @@ ${this.installbuttontext} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
769343
2301