validate_html
Pre-flight check on html / css / js BEFORE writing via update_html. Returns { ok, errors, warnings, parsed } where parsed has byte counts per field and dropped (true if the sanitizer would strip anything from html). Errors cover cap breaches (html_too_large, css_too_large, js_too_large, total_too_large) and sanitizer rejection (html_sanitize_rejected, html_sanitize_empty). At v2 the sanitizer accepts <script> and <link> — those used to be smells but are now first-class agent markup; isolation lives in the opaque render iframe, not the sanitizer. The smells still stripped: inline on*= attributes, javascript:/data:text/html URIs, <meta http-equiv> tags. NEVER writes anything. Use when iterating on a payload so you don't burn a write on something the surface would reject.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | No | JS to validate (optional). | |
| css | No | CSS to validate (optional). | |
| html | No | HTML to validate (optional). |