webview-get-style debugging
This commit is contained in:
+5
-3
@@ -1052,7 +1052,7 @@
|
|||||||
; " return { id: id, style: r };"
|
; " return { id: id, style: r };"
|
||||||
; "}") cl))
|
; "}") cl))
|
||||||
; )))
|
; )))
|
||||||
(displayln (format "~a: ~a" r js-code))
|
;(displayln (format "~a: ~a" r js-code))
|
||||||
(if (eq? r #f)
|
(if (eq? r #f)
|
||||||
#f
|
#f
|
||||||
(let ((h (hash-ref r 'with-ids)))
|
(let ((h (hash-ref r 'with-ids)))
|
||||||
@@ -1063,8 +1063,10 @@
|
|||||||
(make-hash (map (λ (e) (cons (car e) (cadr e))) (cadr style-rec)))
|
(make-hash (map (λ (e) (cons (car e) (cadr e))) (cadr style-rec)))
|
||||||
)
|
)
|
||||||
)) h)))
|
)) h)))
|
||||||
(displayln (format "l = ~a" l))
|
;(displayln (format "l = ~a" l))
|
||||||
(write l)(newline)
|
;(write l)(newline)
|
||||||
|
; l = ((volume-meter . #hash((display . none))))
|
||||||
|
; ((volume-meter . #hash(("display" . "none"))))
|
||||||
(if (symbol? selector)
|
(if (symbol? selector)
|
||||||
(cdr (car l))
|
(cdr (car l))
|
||||||
l))))
|
l))))
|
||||||
|
|||||||
+7
-1
@@ -50,7 +50,13 @@
|
|||||||
(when (not (null? d))
|
(when (not (null? d))
|
||||||
(let ((d* (string->symbol (format "~a" (car d)))))
|
(let ((d* (string->symbol (format "~a" (car d)))))
|
||||||
(webview-set-style! wv element-id (list 'display 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)
|
(define/public (visibility . v)
|
||||||
(when (not (null? v))
|
(when (not (null? v))
|
||||||
|
|||||||
Reference in New Issue
Block a user