Skip to content

Commit 10af53f

Browse files
committed
fix:custom event cljs->js conversion
1 parent dd78e9e commit 10af53f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/klipse/klipse_editors.cljs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
(let [evaluation-chan (eval-fn (str preamble src-code) @state)
5454
first-result (<! evaluation-chan)]
5555
(let [custom-event (js/CustomEvent. "klipse-snippet-evaled"
56-
#js {:detail {:state (clj->js @state)
57-
:src-code src-code}})]
56+
(clj->js {:detail {:state (clj->js @state)}
57+
:src-code src-code}))]
5858
(when-let [code-mirror-dom-node (js/document.querySelector ".klipse-container")]
5959
(-> code-mirror-dom-node (.dispatchEvent custom-event))))
6060
(setter first-result)
@@ -108,7 +108,7 @@
108108
(s/def ::codemirror-options map?)
109109
(s/def ::editor-mode string?)
110110

111-
(s/fdef editor-options
111+
(s/fdef editor-options
112112
:args (s/cat :in-mode ::editor-mode
113113
:out-mode ::editor-mode
114114
:options-in ::codemirror-options
@@ -133,7 +133,7 @@
133133
in-editor (replace-element-by-editor element source-code in-editor-options :indent? indent?)
134134
snippet-args {:loop-msec loop-msec
135135
:preamble preamble}
136-
136+
137137
state (create-state :container container :result-element result-element :editor-args editor-args)]
138138
(when result-element (gdom/setTextContent result-element default-txt))
139139
(handle-events in-editor

0 commit comments

Comments
 (0)