From 337315c5fe060f89b220a88cebd12a1f21bfa96b Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 31 Jul 2017 21:14:50 -0700 Subject: [PATCH] [doclint] remove preprocessor's gen:copy and gen:paste commands These commands proved to be over-complicating the documentation source. We should keep documentation source as simple to edit as possible to make it friendly to contributions. This patch keeps the gen:version command as it is non-invasive. --- docs/api.md | 70 ----------------------------- utils/doclint/preprocessor/index.js | 56 ++++------------------- utils/doclint/preprocessor/test.js | 62 ------------------------- 3 files changed, 8 insertions(+), 180 deletions(-) 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 `