Skip to main content
Latest
interface TargetManager
implements EventEmitter
Re-export
import { type TargetManager } from "https://deno.land/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/types.js";

TargetManager encapsulates all interactions with CDP targets and is responsible for coordinating the configuration of targets with the rest of Puppeteer. Code outside of this class should not subscribe Target.* events and only use the TargetManager events.

There are two implementations: one for Chrome that uses CDP's auto-attach mechanism and one for Firefox because Firefox does not support auto-attach.

Methods

getAvailableTargets(): Map<string, Target>
initialize(): Promise<void>
dispose(): void
addTargetInterceptor(session: CDPSession, interceptor: TargetInterceptor): void
removeTargetInterceptor(session: CDPSession, interceptor: TargetInterceptor): void