(post-refresh-content! content events-chan state)
Does additional work on the content after it is rendered.
Source
(defn
post-refresh-content!
"Does additional work on the content after it is rendered."
[content events-chan state]
(if-let
[crop (:cropped-state state)]
(some->
(:element crop)
(dom/set-cursor-position! (:cursor-position crop)))
(dom/set-cursor-position! content (:cursor-position state)))
(hide-error-messages! (.-parentElement content))
(doseq
[elem (-> content (.querySelectorAll ".error") array-seq)]
(let
[show-error-icon!
(fn [elem] (set! (.-display (.-style elem)) "inline-block"))
show-error-icon!
(debounce show-error-icon! 1000)]
(show-error-icon! elem))
(events/listen
elem
"mouseenter"
(fn* [p1__18516#] (put! events-chan p1__18516#)))
(events/listen
elem
"mouseleave"
(fn* [p1__18517#] (put! events-chan p1__18517#))))
(doseq
[[elem class-name] (rainbow-delimiters content -1)]
(.add (.-classList elem) class-name)))