(dom-init obj)renders the dom element if input is dom and not rendered
(dom-init 1) => 1
(base/dom-format (dom-init (base/dom-create :mock/pane))) => [:+ :mock/pane]
renders the dom element if input is dom and not rendered (dom-init 1) => 1 (base/dom-format (dom-init (base/dom-create :mock/pane))) => [:+ :mock/pane]
provides an extensible interface removing rendered elem from dom
(-> (base/dom-create :mock/pane {} ["hello"]) (dom-render) (dom-remove) (base/dom-format)) => [:- :mock/pane "hello"]
provides an extensible interface removing rendered elem from dom
(-> (base/dom-create :mock/pane {} ["hello"])
(dom-render)
(dom-remove)
(base/dom-format))
=> [:- :mock/pane "hello"](dom-remove-default {:keys [tag props] :as dom})default implementation of dom-remove.
default implementation of dom-remove.
enables rendering of dom ui
(-> (base/dom-create :mock/pane {} ["hello"]) (dom-render) (base/dom-format)) => [:+ :mock/pane "hello"]
enables rendering of dom ui
(-> (base/dom-create :mock/pane {} ["hello"])
(dom-render)
(base/dom-format))
=> [:+ :mock/pane "hello"](dom-render-default {:keys [tag props] :as dom})default implementation of dom-render. throws exception
default implementation of dom-render. throws exception
(dom-rendered form)renders the dom and returns the actual element
(dom-rendered [:mock/pane]) => mock/mock?
renders the dom and returns the actual element (dom-rendered [:mock/pane]) => mock/mock?
replaces one dom element with another
(-> (base/dom-create :mock/pane {} ["hello"]) (dom-render) (dom-replace (base/dom-create :mock/pane {} ["world"])) (base/dom-item) :props) => {:children ["world"]}
replaces one dom element with another
(-> (base/dom-create :mock/pane {} ["hello"])
(dom-render)
(dom-replace (base/dom-create :mock/pane {} ["world"]))
(base/dom-item)
:props)
=> {:children ["world"]}(dom-replace-default dom-old dom-new)default implementation of dom-remove.
default implementation of dom-remove.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |