setProperty
Imperative helper for assigning a DOM property on an element. Unwraps reactive accessors; assigning null or undefined sets the property to null.
# Signature
# Arguments
| name | type | description |
|---|---|---|
| node | Element | target element |
| name | string | property name on the DOM node |
| value | unknown | signal | value to assign. Functions are unwrapped reactively. null / undefined set the property to null. |
Returns: void
# When to use
Use setProperty (or the prop: namespace in JSX) whenever the DOM property and HTML attribute diverge — value on inputs after user edits, checked state, srcObject on video, textContent, or custom properties on a custom element.