mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: fix example formatting in evaluateOnNewDocument (#8906)
This commit is contained in:
parent
32400954c5
commit
6e7c6368d3
@ -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);
|
||||
```
|
||||
|
@ -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);
|
||||
* ```
|
||||
|
Loading…
Reference in New Issue
Block a user