mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: remove obsolete page.target() from CDPSession doc (#12163)
This commit is contained in:
parent
81ded4c85f
commit
950cbf73f8
@ -25,7 +25,7 @@ The constructor for this class is marked as internal. Third-party code should no
|
|||||||
## Example
|
## Example
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
const client = await page.target().createCDPSession();
|
const client = await page.createCDPSession();
|
||||||
await client.send('Animation.enable');
|
await client.send('Animation.enable');
|
||||||
client.on('Animation.animationCreated', () =>
|
client.on('Animation.animationCreated', () =>
|
||||||
console.log('Animation created!')
|
console.log('Animation created!')
|
||||||
|
@ -74,7 +74,7 @@ export interface CommandOptions {
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* const client = await page.target().createCDPSession();
|
* const client = await page.createCDPSession();
|
||||||
* await client.send('Animation.enable');
|
* await client.send('Animation.enable');
|
||||||
* client.on('Animation.animationCreated', () =>
|
* client.on('Animation.animationCreated', () =>
|
||||||
* console.log('Animation created!')
|
* console.log('Animation created!')
|
||||||
|
Loading…
Reference in New Issue
Block a user