mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(api.md): Fix CDPSession code example (#2654)
This commit is contained in:
parent
0f8c7e76c2
commit
e03802688d
@ -2846,7 +2846,7 @@ Documentation on DevTools Protocol can be found here: [DevTools Protocol Viewer]
|
||||
```js
|
||||
const client = await page.target().createCDPSession();
|
||||
await client.send('Animation.enable');
|
||||
await client.on('Animation.animationCreated', () => console.log('Animation created!'));
|
||||
client.on('Animation.animationCreated', () => console.log('Animation created!'));
|
||||
const response = await client.send('Animation.getPlaybackRate');
|
||||
console.log('playback rate is ' + response.playbackRate);
|
||||
await client.send('Animation.setPlaybackRate', {
|
||||
|
Loading…
Reference in New Issue
Block a user