setAttribute(node, name, value) is the platform setAttribute on
node. Its companions are hasAttribute and
removeAttribute. Prefer JSX attributes —
this is an imperative escape hatch. Part of
pota/use/dom.
| Argument | Type | Description |
|---|---|---|
node |
Element |
The element to mutate. |
name |
string |
Attribute name. |
value |
string |
Attribute value. |