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。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No |