prevent native menus in browser

This commit is contained in:
Nystik
2026-05-23 16:32:59 +02:00
parent 10c6782652
commit 4fff803cbd
7 changed files with 189 additions and 11 deletions

View File

@@ -31,6 +31,18 @@ export class menuShim {
}
closePopup() {}
// If the appearance guard in native-menu-guard.js ever fails to block the native-menu path, warn instead of throwing.
on(channel, listener) {
console.warn(
`[shim:Menu] Menu.on(${channel}) called; native-menu path escaped the guard.`,
);
return this;
}
off(channel, listener) {
return this;
}
}
export class menuItemShim {