docs: remove obsolete page.target() from CDPSession doc (#12163)

This commit is contained in:
Rick Viscomi 2024-03-27 11:23:04 -04:00 committed by GitHub
parent 81ded4c85f
commit 950cbf73f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ The constructor for this class is marked as internal. Third-party code should no
## Example
```ts
const client = await page.target().createCDPSession();
const client = await page.createCDPSession();
await client.send('Animation.enable');
client.on('Animation.animationCreated', () =>
console.log('Animation created!')

View File

@ -74,7 +74,7 @@ export interface CommandOptions {
* @example
*
* ```ts
* const client = await page.target().createCDPSession();
* const client = await page.createCDPSession();
* await client.send('Animation.enable');
* client.on('Animation.animationCreated', () =>
* console.log('Animation created!')