(define-bool-prop! proto prop-name attr-name)Install a boolean JS property that reflects to/from an HTML attribute.
Install a boolean JS property that reflects to/from an HTML attribute.
(define-number-prop! proto prop-name attr-name default-val)Install a numeric JS property that reflects to/from an HTML attribute.
default-val is returned when the attribute is absent or non-numeric.
Install a numeric JS property that reflects to/from an HTML attribute. `default-val` is returned when the attribute is absent or non-numeric.
(define-string-prop! proto prop-name attr-name)(define-string-prop! proto prop-name attr-name default-val)Install a string JS property that reflects to/from an HTML attribute.
default-val is returned when the attribute is absent (defaults to nil).
Install a string JS property that reflects to/from an HTML attribute. `default-val` is returned when the attribute is absent (defaults to nil).
(dispatch! el event-name detail)Dispatch a non-cancelable CustomEvent that bubbles and is composed.
Dispatch a non-cancelable CustomEvent that bubbles and is composed.
(dispatch-cancelable! el event-name detail)Dispatch a cancelable CustomEvent. Returns true when NOT cancelled.
Dispatch a cancelable CustomEvent. Returns true when NOT cancelled.
(dispatch-document! event-name)(dispatch-document! event-name detail)Dispatch a non-bubbling, non-composed CustomEvent on document. Used for parent notification when the source element is disconnecting and normal bubbling cannot reach the parent. Single-arity omits the detail field entirely (event.detail === null).
Dispatch a non-bubbling, non-composed CustomEvent on document. Used for parent notification when the source element is disconnecting and normal bubbling cannot reach the parent. Single-arity omits the detail field entirely (event.detail === null).
(install-properties! proto property-api)Install JS property accessors on a prototype, driven by a property-api map.
Each entry is {prop-key {:type 'boolean|'string|'number
:reflects-attribute attr-name
:default default-val}}.
Skips entries marked :readonly true. For 'number entries, an
omitted :default falls back to 0; declare :default explicitly
when the natural empty value differs.
Install JS property accessors on a prototype, driven by a property-api map.
Each entry is {prop-key {:type 'boolean|'string|'number
:reflects-attribute attr-name
:default default-val}}.
Skips entries marked :readonly true. For `'number` entries, an
omitted `:default` falls back to `0`; declare `:default` explicitly
when the natural empty value differs.(set-bool-attr! el attr-name value)Delegates to set-attr!/remove-attr! so a single hook site fires per call.
Delegates to set-attr!/remove-attr! so a single hook site fires per call.
Dev-only extension point for dev/x-trace-history. Holds a 1-arg function that receives a CLJS payload describing each mutation or dispatch. Reset via reset!. nil by default — when nil, every site is a single atom-deref + nil check.
Dev-only extension point for dev/x-trace-history. Holds a 1-arg function that receives a CLJS payload describing each mutation or dispatch. Reset via reset!. nil by default — when nil, every site is a single atom-deref + nil check.
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 |