cdpclient

package
v0.0.0-...-6026c52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a minimal CDP client that communicates over a browser-level DevTools WebSocket connection.

func Dial

func Dial(ctx context.Context, devtoolsURL string) (*Client, error)

Dial opens a WebSocket connection to the given DevTools URL.

func (*Client) Close

func (c *Client) Close() error

Close shuts down the WebSocket connection.

func (*Client) SetDeviceMetricsOverride

func (c *Client) SetDeviceMetricsOverride(ctx context.Context, width, height int) error

SetDeviceMetricsOverride sets the viewport dimensions on the first page target found in the browser. It attaches to the target with a flattened session, sends Emulation.setDeviceMetricsOverride, then detaches.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL