Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Playwright Public Protocol Types

From Leeroopedia
Knowledge Sources
Domains TypeDefinitions, ChromiumProtocol, PublicAPI
Last Updated 2026-02-12 00:00 GMT

Overview

Auto-generated TypeScript type definitions for the Chrome DevTools Protocol (CDP), published as part of the playwright-core package's public types.

Description

This file (~23,824 lines) is generated by /utils/protocol-types-generator/index.js and is identical in content to the internal Chromium protocol types at src/server/chromium/protocol.d.ts. It is placed under types/ to be included in the published playwright-core npm package, making CDP types available to consumers who use Playwright's CDP session API.

All types are organized under the Protocol namespace with sub-namespaces for each CDP domain (Accessibility, CSS, DOM, Debugger, Emulation, Input, Network, Page, Runtime, Target, etc.).

This file is referenced by the companion types/types.d.ts via:

import { Protocol } from './protocol';

This makes Protocol types available on CDP session return types and event payloads in the public Playwright API.

Usage

These types are consumed by TypeScript users who interact with Chrome DevTools Protocol sessions through Playwright's CDPSession API. When calling cdpSession.send() or handling CDP events, these types provide autocompletion and compile-time checking for CDP commands and their parameters.

Code Reference

Source Location

Import

// Typically consumed indirectly through Playwright's CDPSession API
import { Protocol } from 'playwright-core/types/protocol';

Generation

# This file is auto-generated; do not edit manually
# Generated by: /utils/protocol-types-generator/index.js

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment