clojureScript Oneプロジェクトを作成しようとしていますが、イベントリスナーを削除するのに問題があります(リッスン解除)-リスナーは次のコードで登録されています:
(defn- add-expand_fold-listener
"Accepts a ele-id and creates listeners for click events on div
which will then fire rendering changes"
[ele-id]
(log/log "adding opening listeners")
(event/listen (single-node (by-id ele-id))
"click"
#(dispatch/fire (re-class ele-id "foldup" "expand"))))
しかし、私がこのコードで聞き取りを解除しようとすると:
(defn- remove-expand_fold-listener
"Accepts a ele-id and removes listener for click events on div"
[ele-id]
(log/log "removing opening listener")
(event/unlisten (by-id ele-id)
"click"
#(dispatch/fire (re-class ele-id "foldup" "expand"))
false)
(log/log "done removing listener"))
コードはエラーなしで実行されますが、リスナーは削除されません。構文エラーがあると思いますが、どこにあるのかわかりません。
どんな助けでも大歓迎です。ありがとうラリー