0
如何扩展使用Clojurescript协议的Google Closure元素。我试过,但它似乎并没有工作时:将Clojurescript协议添加到Google Closure元素
(ns my-stuff.main
(:require
[goog.dom :as dom))
(defprotocol ds
(-set-text [this text]))
(extend-type js/HTMLDivElement
ds
(-set-text
[this text] (dom/setTextContent this text)))
(set-text (.getElementById js/document "a") "howdy")
:我必须做一些基本的错误,我认为与ID元素“是”我的HTML页面上永远不会被更新。