diff --git a/docs/api.md b/docs/api.md index abb059d6540..707b23fe2f3 100644 --- a/docs/api.md +++ b/docs/api.md @@ -312,8 +312,6 @@ Emitted when a request is successfully finished. Emitted when a [response] is received. #### page.$(selector, pageFunction, ...args) - - - `selector` <[string]> A [selector] to be matched in the page - `pageFunction` <[function]\([Element]\)> Function to be evaluated with first element matching `selector` - `...args` <...[string]> Arguments to pass to `pageFunction` @@ -322,12 +320,9 @@ Example: ```js const outerhtml = await page.$('#box', e => e.outerHTML); ``` - Shortcut for [page.mainFrame().$(selector, pageFunction, ...args)](#frameselector-pagefunction-args). #### page.$$(selector, pageFunction, ...args) - - - `selector` <[string]> A [selector] to be matched in the page - `pageFunction` <[function]\([Element]\)> Function to be evaluted for every element matching `selector`. - `...args` <...[string]> Arguments to pass to `pageFunction` @@ -337,32 +332,25 @@ Example: const headings = await page.$$('h1,h2,h3,h4', el => el.textContent); for (const heading of headings) console.log(heading); ``` - Shortcut for [page.mainFrame().$$(selector, pageFunction, ...args)](#frameselector-pagefunction-args-1). #### page.addScriptTag(url) - - - `url` <[string]> Url of a script to be added - returns: <[Promise]> Promise which resolves as the script gets added and loads. Adds a `