webview-get-style debugging

This commit is contained in:
2026-07-30 13:30:36 +02:00
parent ac961f5fe0
commit 31b1e82834
2 changed files with 12 additions and 4 deletions
+5 -3
View File
@@ -1052,7 +1052,7 @@
; " return { id: id, style: r };"
; "}") cl))
; )))
(displayln (format "~a: ~a" r js-code))
;(displayln (format "~a: ~a" r js-code))
(if (eq? r #f)
#f
(let ((h (hash-ref r 'with-ids)))
@@ -1063,8 +1063,10 @@
(make-hash (map (λ (e) (cons (car e) (cadr e))) (cadr style-rec)))
)
)) h)))
(displayln (format "l = ~a" l))
(write l)(newline)
;(displayln (format "l = ~a" l))
;(write l)(newline)
; l = ((volume-meter . #hash((display . none))))
; ((volume-meter . #hash(("display" . "none"))))
(if (symbol? selector)
(cdr (car l))
l))))
+7 -1
View File
@@ -50,7 +50,13 @@
(when (not (null? d))
(let ((d* (string->symbol (format "~a" (car d)))))
(webview-set-style! wv element-id (list 'display d*))))
(string->symbol (hash-ref (webview-get-style wv element-id 'display) 'display)))
(let ((style-hash (webview-get-style wv element-id 'display)))
(let ((display-style (hash-ref (if (eq? style-hash #f)
(make-hash)
style-hash) 'display #f)))
(if (eq? display-style #f)
#f
(string->symbol display-style)))))
(define/public (visibility . v)
(when (not (null? v))