dialog_off
Override window.alert, confirm, and prompt to auto-close them by injecting JavaScript before triggering. Use for automated browsing to prevent dialog blocking, but not for beforeunload or already-open dialogs.
Instructions
dialog_off() — JS 层覆盖 window.alert/confirm/prompt 为自动关闭(需在触发前注入, 盖不住 beforeunload / 已开的原生对话框)。想要兜底防挂用扩展的 CDP 层处置(见 get_last_dialog)——那个 attach 后一直生效、覆盖 beforeunload。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "dialog_off"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No |