adjust native

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:17 +03:00
1 parent a86f896694
commit d35538e2ba
17 files changed
+121 -96

No files matched your search

+1 -3
View File
@@ -1,5 +1,3 @@
let counter = 0
export default class extends HTMLElement {
connectedCallback () {
const bridge = window.webkit?.messageHandlers?.native
@@ -10,7 +8,7 @@ export default class extends HTMLElement {
if (!target && !this.dataset.native) return
this.nativeId ||= `native-action-${++counter}`
this.nativeId ||= `native-action-${Math.random().toString(32).split('.')[1]}`
this.id = this.nativeId
if (target) target.dataset.nativeId = this.nativeId