mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
adjust native
This commit is contained in:
1 parent
a86f896694
commit
d35538e2ba
17 files changed
+121
-96
No files matched your search
@@ -1,5 +1,3 @@
|
||||
let counter = 0
|
||||
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
if (window.webkit?.messageHandlers?.native) {
|
||||
@@ -28,7 +26,7 @@ export default class extends HTMLElement {
|
||||
const items = [...this.querySelectorAll('native-menu-action')].map((action) => {
|
||||
const target = action.querySelector('a, button, [role="button"]') || action.firstElementChild
|
||||
|
||||
target.dataset.nativeId ||= `native-menu-${++counter}`
|
||||
target.dataset.nativeId ||= `native-menu-${Math.random().toString(32).split('.')[1]}`
|
||||
|
||||
return {
|
||||
id: target.dataset.nativeId,
|
||||
|
||||
Reference in new issue
Block a user