docs: fix example formatting in evaluateOnNewDocument (#8906)

This commit is contained in:
Alex Rudenko 2022-09-06 12:39:55 +02:00 committed by GitHub
parent 32400954c5
commit 6e7c6368d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -49,7 +49,7 @@ return ['en-US', 'en', 'bn'];
});
// In your puppeteer script, assuming the preload.js file is
in same folder of our script
// in same folder of our script.
const preloadFile = fs.readFileSync('./preload.js', 'utf8');
await page.evaluateOnNewDocument(preloadFile);
```

View File

@ -2790,7 +2790,7 @@ export class Page extends EventEmitter {
* });
*
* // In your puppeteer script, assuming the preload.js file is
* in same folder of our script
* // in same folder of our script.
* const preloadFile = fs.readFileSync('./preload.js', 'utf8');
* await page.evaluateOnNewDocument(preloadFile);
* ```