onbeforinstallprompt-test
This commit is contained in:
parent
396b651fc5
commit
e7977aa487
@ -62,10 +62,12 @@ export class WordRotatorSettingFragment extends LocalStorageSettingsFragment {
|
||||
});
|
||||
|
||||
InstallManager.setCanInstallListener((e) => {
|
||||
console.log("can install!");
|
||||
let installButton = this.findBy("#install-button");
|
||||
installButton.addEventListener("click", () => {
|
||||
e.prompt();
|
||||
e["userChoice"].then(res => {
|
||||
console.log(res);
|
||||
if (res["outcome"] === 'accepted') {
|
||||
installButton.classList.add("hidden");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user