webview-get-style debugging
This commit is contained in:
+5
-3
@@ -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
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user