Module

x/puppeteer/mod.ts>Connection

A port of puppeteer running on Deno
Latest
class Connection
extends EventEmitter
import { Connection } from "https://dotland.deno.dev/x/puppeteer@16.2.0/mod.ts";

Constructors

new
Connection(
url: string,
transport: ConnectionTransport,
delay?: number,
)

Properties

readonly
_closed: boolean
readonly
_sessions: Map<string, CDPSession>

Methods

protected
onMessage(message: string): Promise<void>
_createSession(targetInfo: Protocol.Target.TargetInfo, isAutoAttachEmulated?: boolean): Promise<CDPSession>
_rawSend(message: Record<string, unknown>): number
createSession(targetInfo: Protocol.Target.TargetInfo): Promise<CDPSession>
dispose(): void
isAutoAttached(targetId: string): boolean
send<T extends keyof ProtocolMapping.Commands>(method: T, ...paramArgs: ProtocolMapping.Commands[T]["paramsType"]): Promise<ProtocolMapping.Commands[T]["returnType"]>
session(sessionId: string): CDPSession | null
url(): string

Static Methods

fromSession(session: CDPSession): Connection | undefined
import Connection
import { Connection } from "https://dotland.deno.dev/x/puppeteer@16.2.0/mod.ts";

Copyright 2022 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.