Skip to main content
Module

x/puppeteer_plus/mod.ts>Protocol.Browser.SetDownloadBehaviorRequest

Deno port of puppeteer base on latest TypeScript source.
Go to Latest
interface Protocol.Browser.SetDownloadBehaviorRequest
import { type Protocol } from "https://deno.land/x/puppeteer_plus@0.14.0/mod.ts";
const { SetDownloadBehaviorRequest } = Protocol.Browser;

Properties

behavior: (
| "deny"
| "allow"
| "allowAndName"
| "default"
)

Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids. (SetDownloadBehaviorRequestBehavior enum)

optional
browserContextId: BrowserContextID

BrowserContext to set download behavior. When omitted, default browser context is used.

optional
downloadPath: string

The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.

optional
eventsEnabled: boolean

Whether to emit download events (defaults to false).