adjust downlaod

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:17 +03:00
1 parent 87b57279a4
commit 05fa75f9a2
1 file changed
+7 -1
+7 -1
View File
@@ -23,7 +23,13 @@ export default targetable(class extends HTMLElement {
const download = window.webkit?.messageHandlers?.download
if (download) return download.postMessage({ src: this.dataset.src })
if (download) {
this.toggleState()
document.addEventListener('native:download-end', () => this.toggleState(), { once: true })
return download.postMessage({ src: this.dataset.src })
}
this.toggleState()