From 970e9c4b350b6e0ffd2ad1870c32f60230004989 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sat, 19 Aug 2017 20:04:02 +0300 Subject: [PATCH] doc: fix copy-paste artefacts (#394) --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index a2be9454de1..83c1d2ca0c7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -734,7 +734,7 @@ Shortcut for [page.mainFrame().waitFor(selectorOrFunctionOrTimeout[, options])]( - `mutation` - to execute `pageFunction` on every DOM mutation. - `timeout` <[number]> maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). - `...args` <...[Serializable]> Arguments to pass to `pageFunction` -- returns: <[Promise]> Promise which resolves when element specified by selector string is added to DOM. +- returns: <[Promise]> Promise which resolves when the `pageFunction` returns a truthy value. The `waitForFunction` could be used to observe viewport size change: ```js @@ -1049,7 +1049,7 @@ This method behaves differently with respect to the type of the first parameter: - `mutation` - to execute `pageFunction` on every DOM mutation. - `timeout` <[number]> maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). - `...args` <...[Serializable]> Arguments to pass to `pageFunction` -- returns: <[Promise]> Promise which resolves when element specified by selector string is added to DOM. +- returns: <[Promise]> Promise which resolves when the `pageFunction` returns a truthy value. The `waitForFunction` could be used to observe viewport size change: ```js