From eb53a8fdd09c473ef6ce96696604ee8ba1c952bf Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Thu, 5 Jul 2018 10:01:40 +1000 Subject: [PATCH] docs(api.md): Fix selector description for pages & frames (#2841) --- docs/api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index 8e21d958e64..c6ae9a447a0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -777,7 +777,7 @@ The method runs `document.querySelectorAll` within the page. If no elements matc Shortcut for [page.mainFrame().$$(selector)](#frameselector-1). #### page.$$eval(selector, pageFunction[, ...args]) -- `selector` <[string]> A [selector] to query frame for +- `selector` <[string]> A [selector] to query page for - `pageFunction` <[function]> Function to be evaluated in browser context - `...args` <...[Serializable]|[JSHandle]> Arguments to pass to `pageFunction` - returns: <[Promise]<[Serializable]>> Promise which resolves to the return value of `pageFunction` @@ -1918,13 +1918,13 @@ puppeteer.launch().then(async browser => { ``` #### frame.$(selector) -- `selector` <[string]> Selector to query page for +- `selector` <[string]> A [selector] to query frame for - returns: <[Promise]> Promise which resolves to ElementHandle pointing to the frame element. The method queries frame for the selector. If there's no such element within the frame, the method will resolve to `null`. #### frame.$$(selector) -- `selector` <[string]> Selector to query page for +- `selector` <[string]> A [selector] to query frame for - returns: <[Promise]<[Array]<[ElementHandle]>>> Promise which resolves to ElementHandles pointing to the frame elements. The method runs `document.querySelectorAll` within the frame. If no elements match the selector, the return value resolve to `[]`.