(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
(register! tag-name class-opts)Register a custom element if not already defined.
Register a custom element if not already defined.
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 |