diff --git a/docs/api.md b/docs/api.md index 154fb1445ad..638d24d3cac 100644 --- a/docs/api.md +++ b/docs/api.md @@ -176,14 +176,14 @@ const browser = new Browser(); browser.newPage().then(async page => { await page.navigate('https://example.com'); browser.close(); -}) +}); ``` #### new Browser([options]) - `options` <[Object]> Set of configurable options to set on the browser. Can have the following fields: - - `headless` <[boolean]> Wether to run chromium in headless mode. Defaults to `true`. + - `headless` <[boolean]> Whether to run chromium in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome). Defaults to `true`. - `executablePath` <[string]> Path to a chromium executable to run instead of bundled chromium. If `executablePath` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd). - - `args` <[Array]<[string]>> Additional arguments to pass to the chromium instance. List of chromium flags could be found [here](http://peter.sh/experiments/chromium-command-line-switches/). + - `args` <[Array]<[string]>> Additional arguments to pass to the chromium instance. List of chromium flags can be found [here](http://peter.sh/experiments/chromium-command-line-switches/). #### browser.close() @@ -263,7 +263,7 @@ page.evaluate(() => console.log(5, 'hello', {foo: 'bar'})); #### event: 'dialog' - <[Dialog]> -Emitted when a javascript dialog, such as `alert`, `prompt`, `confirm` or `beforeunload`, gets opened on the page. Puppeteer can take action to the dialog via dialog's [accept](#dialogacceptprompttext) or [dismiss](#dialogdismiss) methods. +Emitted when a JavaScript dialog, such as `alert`, `prompt`, `confirm` or `beforeunload`, gets opened on the page. Puppeteer can take action to the dialog via dialog's [accept](#dialogacceptprompttext) or [dismiss](#dialogdismiss) methods. #### event: 'frameattached' - <[Frame]> @@ -342,7 +342,7 @@ Shortcut for [page.mainFrame().$$(selector, pageFunction, ...args)](#pageselecto - `url` <[string]> Url of a script to be added - returns: <[Promise]> Promise which resolves as the script gets added and loads. -Adds a `` tag to the page with the desired url. Alternatively, javascript could be injected to the page via [`page.injectFile`](#pageinjectfilefilepath) method. +Adds a `` tag to the frame with the desired url. Alternatively, javascript could be injected to the frame via [`frame.injectFile`](#frameinjectfilefilepath) method. +Adds a `