0.0.8 • Published 1 year ago

webdriver-bidi-protocol v0.0.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

webdriver-bidi-protocol

This repository contains TypeScript types conforming to the WebDriver BiDi specification.

Installation

npm install webdriver-bidi-protocol

Usage

In your TypeScript client implementation, you can now import WebDriver BiDi types:

import {Commands} from 'webdriver-bidi-protocol';

async function sendCommand<T extends keyof Commands>(
  method: T,
  params: Commands[T]['params']
): {result: Commands[T]['returnType']} {
  // Implementation for sending the data using WebSockets.
}

// Now TypeScript validates that the params match the spec for 'browsingContext.print'.
await sendCommand('browsingContext.print', {context: 'xxx'});

Versioning

This package patch version will be incremented whenever there are specification updates.

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.1

1 year ago