modify_dom
Edit attributes, classes, styles, or text of a live DOM element. Changes are temporary and vanish on reload.
Instructions
Change an element in the live DOM: setAttribute, removeAttribute, addClass, removeClass, setStyle, setTextContent. Nothing is persisted — the next reload restores the page as the server sends it. For styling many elements at once inject_css is one call instead of N.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Attribute name | |
| value | No | Attribute value, style declaration, or text, per action | |
| action | Yes | setStyle takes a CSS declaration in value; addClass/removeClass take className | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| frame_id | No | Target iframe id from get_frames; omitted = main frame | |
| selector | Yes | CSS selector; ">>>" pierces shadow DOM. Only the first match is changed | |
| className | No | Class to add or remove (addClass/removeClass) |