watch_dom
Monitor DOM mutations using a MutationObserver. Install a watcher on a page, then retrieve buffered changes on later calls—ideal for tracking dynamic content updates.
Instructions
Watch DOM mutations (MutationObserver). First call installs the watcher; later calls read accumulated mutations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop | No | Disconnect observer | |
| clear | No | Clear buffer after read | |
| limit | No | Most recent mutations; buffer 1000 | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| subtree | No | Observe descendants too, not just the matched node | |
| selector | No | Subtree to observe; ">>>" pierces shadow DOM | body |
| childList | No | Report added and removed children | |
| attributes | No | Report attribute changes | |
| characterData | No | Report text content changes |