docs: fix string eval snippet

Signed-off-by: Pavel Feldman <pavel.feldman@gmail.com>
This commit is contained in:
Pavel Feldman 2023-09-05 16:34:56 -07:00 committed by GitHub
parent f045e13e00
commit e065a927bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,8 +95,8 @@ Using dynamic imports inside a function passed to various `evaluate()` methods i
To work around this issue, use a string template instead of a function:
```js
await page.evaluate(`async () => {
await page.evaluate(`(async () => {
const { value } = await import('some-module');
console.log(value);
}`);
})()`);
```