diff --git a/docs/api.md b/docs/api.md index ee5826ef8a8..04e9774950b 100644 --- a/docs/api.md +++ b/docs/api.md @@ -780,7 +780,7 @@ Shortcut for [page.mainFrame().$$(selector)](#frameselector-1). - `...args` <...[Serializable]|[JSHandle]> Arguments to pass to `pageFunction` - returns: <[Promise]<[Serializable]>> Promise which resolves to the return value of `pageFunction` -This method runs `document.querySelectorAll` within the page and passes it as the first argument to `pageFunction`. +This method runs `Array.from(document.querySelectorAll(selector))` within the page and passes it as the first argument to `pageFunction`. If `pageFunction` returns a [Promise], then `page.$$eval` would wait for the promise to resolve and return its value. @@ -1908,7 +1908,7 @@ The method runs `document.querySelectorAll` within the frame. If no elements mat - `...args` <...[Serializable]|[JSHandle]> Arguments to pass to `pageFunction` - returns: <[Promise]<[Serializable]>> Promise which resolves to the return value of `pageFunction` -This method runs `document.querySelectorAll` within the frame and passes it as the first argument to `pageFunction`. +This method runs `Array.from(document.querySelectorAll(selector))` within the frame and passes it as the first argument to `pageFunction`. If `pageFunction` returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return its value.