update_page_element
Updates an element's style, config, events, bindings, and responsive settings, previewing changes for approval before applying.
Instructions
Update properties of a specific element in page source. Two-step process: STEP 1: Call with dry_run=true (default) → returns diff of what will change. STEP 2: Show the diff to the user and ask for confirmation. NEVER proceed without explicit user approval. STEP 3: Only after user confirms, call again with dry_run=false to apply. IMPORTANT: You MUST show the diff to the user and get explicit "yes/ok/confirm" before calling with dry_run=false. Skipping confirmation risks data loss. Merge rules: style/config/specials = shallow merge, responsive = merge by bp key. events/bindings = REPLACE the whole array — pass the COMPLETE list (read it first with get_page_element so you don't drop the others); entries are auto-normalized (id + eventName filled in, so you can pass just { action, ...fields } / { target }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | CSS style properties to merge (e.g. {color: '#fff', 'font-size': '16px'}) | |
| config | No | Config properties to merge | |
| events | No | Complete events array (replaces existing) | |
| dry_run | No | Preview only (true) or apply changes (false). Defaults to confirm_mode setting. Use toggle_confirm_mode to change default. | |
| page_id | Yes | Page ID | |
| bindings | No | Complete bindings array (replaces existing) | |
| specials | No | Specials to merge (text, custom_class, custom_css, etc.) | |
| element_id | Yes | Element ID to update (e.g. 'TEXT-3', 'BUTTON-1') | |
| responsive | No | Responsive breakpoint overrides (e.g. {bp1: {style: {...}, config: {...}}}) |