Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 2.19 KB

File metadata and controls

31 lines (22 loc) · 2.19 KB

devtools-protocol devtools-protocol on npm

⚠️ This repository is related to Chrome DevTools Protocol, but does not track issues regarding its definition or implementation. If you want to file an issue for the Chrome DevTools Protocol, please open an issue on https://crbug.com under component: Platform>DevTools>Platform.

Use the protocol viewer for navigating the protocol.

TypeScript definitions for the protocol's types are available in 'types/protocol.d.ts'. Mappings from Commands and events to these types are available in either generated DomainApi style in types/protocol-proxy-api.d.ts or in simple name-to-type-interface style in types/protocol-mapping.d.ts.

Also, this repo is published as the devtools-protocol npm module.

Development

The .pdl files, the json/ files and the TypeScript definitions in types/ are all generated by scripts/update-to-latest.sh, which runs daily. Do not edit them by hand.

The TypeScript generator itself lives in Chromium, at //third_party/blink/public/devtools_protocol/scripts/protocol_dts_generator.ts, so that Chromium and this repo share a single source of truth. It is fetched into tmp/chromium/ by the sparse checkout in update-to-latest.sh. Changes to the generator should be made in Chromium.

To regenerate types/ against an existing local Chromium checkout:

cd scripts
CHROMIUM_PROTOCOL_SCRIPTS_DIR=/path/to/src/third_party/blink/public/devtools_protocol/scripts \
  npm run build-protocol-dts