mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(api.md): Fix missing await
in extension example (#3447)
The extensions example did not `await puppeteer.launch(...)` throwing errors right after awaiting `browser.targets()`.
This commit is contained in:
parent
81edbbb58e
commit
9800b2c3c2
@ -404,7 +404,7 @@ const puppeteer = require('puppeteer');
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const pathToExtension = require('path').join(__dirname, 'my-extension');
|
const pathToExtension = require('path').join(__dirname, 'my-extension');
|
||||||
const browser = puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
headless: false,
|
headless: false,
|
||||||
args: [
|
args: [
|
||||||
`--disable-extensions-except=${pathToExtension}`,
|
`--disable-extensions-except=${pathToExtension}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user