docs(api.md): Fix CDPSession code example (#2654)

This commit is contained in:
Darío Kondratiuk 2018-06-01 15:26:40 -03:00 committed by Andrey Lushnikov
parent 0f8c7e76c2
commit e03802688d

View File

@ -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', {