docs: connect example with non-deprecated API (#8463)
See [deprecation notice][notice].
[notice]: c627927bf5/types/types.d.ts (L8205)
This commit is contained in:
parent
fe96cc274f
commit
222151f2e1
|
|
@ -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
2
types/types.d.ts
vendored
|
|
@ -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();
|
||||
* })();
|
||||
|
|
|
|||
Loading…
Reference in a new issue