Liking cljdoc? Tell your friends :D
ClojureScript only.

baredom.utils.component


make-element-classcljs

(make-element-class {:keys [observed-attributes connected-fn disconnected-fn
                            attribute-changed-fn form-associated?
                            form-disabled-fn form-reset-fn setup-prototype-fn]})

Create a custom element class from a declarative options map.

Required keys: :observed-attributes — #js [...] array of attribute names :connected-fn — (fn [el] ...) called on connectedCallback :attribute-changed-fn — (fn [el name old new] ...) called on attributeChangedCallback

Optional keys: :disconnected-fn — (fn [el] ...) called on disconnectedCallback :form-associated? — true to mark as form-associated element :form-disabled-fn — (fn [el disabled?] ...) called on formDisabledCallback :form-reset-fn — (fn [el] ...) called on formResetCallback :setup-prototype-fn — (fn [proto] ...) install properties/methods on prototype

Create a custom element class from a declarative options map.

Required keys:
  :observed-attributes  — #js [...] array of attribute names
  :connected-fn         — (fn [el] ...) called on connectedCallback
  :attribute-changed-fn — (fn [el name old new] ...) called on attributeChangedCallback

Optional keys:
  :disconnected-fn      — (fn [el] ...) called on disconnectedCallback
  :form-associated?     — true to mark as form-associated element
  :form-disabled-fn     — (fn [el disabled?] ...) called on formDisabledCallback
  :form-reset-fn        — (fn [el] ...) called on formResetCallback
  :setup-prototype-fn   — (fn [proto] ...) install properties/methods on prototype
sourceraw docstring

register!cljs

(register! tag-name class-opts)

Register a custom element if not already defined.

Register a custom element if not already defined.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close