dialog_off
Disable JavaScript alert, confirm, and prompt dialogs by overriding them to auto-close before page triggers fire. Prevents dialog popups from blocking browser automation workflows.
Instructions
dialog_off() — JS 层覆盖 window.alert/confirm/prompt 为自动关闭(需在触发前注入, 盖不住 beforeunload / 已开的原生对话框)。想要兜底防挂用扩展的 CDP 层处置(见 get_last_dialog)——那个 attach 后一直生效、覆盖 beforeunload。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No |