docs: connect example with non-deprecated API (#8463)

See [deprecation notice][notice].

[notice]: c627927bf5/types/types.d.ts (L8205)
This commit is contained in:
Ross Wollman 2021-08-26 02:49:47 -07:00 committed by GitHub
parent fe96cc274f
commit 222151f2e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -268,7 +268,7 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'.
const browserServer = await chromium.launchServer();
const wsEndpoint = browserServer.wsEndpoint();
// Use web socket endpoint later to establish a connection.
const browser = await chromium.connect({ wsEndpoint });
const browser = await chromium.connect(wsEndpoint);
// Close browser instance.
await browserServer.close();
})();

2
types/types.d.ts vendored
View file

@ -8614,7 +8614,7 @@ export interface BrowserType<Unused = {}> {
* const browserServer = await chromium.launchServer();
* const wsEndpoint = browserServer.wsEndpoint();
* // Use web socket endpoint later to establish a connection.
* const browser = await chromium.connect({ wsEndpoint });
* const browser = await chromium.connect(wsEndpoint);
* // Close browser instance.
* await browserServer.close();
* })();