safari_verify_state
Verify that an editor's internal state matches the expected value before submitting forms to prevent errors from unsynchronized data.
Instructions
Verify the framework-level state of an editor/input matches the expected value. Returns JSON {match, mode, actual, expected, hint?}. Modern editors (ProseMirror, Lexical, Closure, React-controlled inputs) maintain state separately from the DOM — .value or .textContent may show new text while the internal store still holds old data, so a Submit click sends stale data. Call this AFTER safari_fill and BEFORE clicking Submit on critical forms (Featured.com, LinkedIn share, Medium, Reddit).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector of the editor/input to verify | |
| expected | Yes | Expected value or text fragment that should appear in framework state |