popup-menu

This commit is contained in:
2026-04-07 23:42:08 +02:00
parent 798e8c8c43
commit 10a9f4b431
2 changed files with 33 additions and 0 deletions

View File

@@ -75,6 +75,7 @@
webview-base-url
webview-set-menu!
webview-popup-menu!
webview-set-innerHTML!
@@ -537,6 +538,15 @@
)
)
(define/contract (webview-popup-menu! wv menu x y)
(-> wv-win? is-wv-menu? number? number? symbol?)
(let* ((json (wv-menu->json menu))
(js (string-append "window._web_wire_popup_menu(JSON.parse('"
json "', " (format "~a, ~a" x y)
");"))
)
(webview-run-js wv js)))
(define (loglevel? x)
(and (symbol? x)
(or (eq? x 'error) (eq? x 'info) (eq? x 'debug) (eq? x 'warning))))