puppeteer/src/common
Johan Bay 72fe86fe6a
feat(a11y-query): introduce internal handlers (#6437)
This commit changes the internal representation of query handlers to contain Puppeteer-level code instead of page functions.
The interface `CustomQueryHandler` is introduced for user-defined query handlers. When a `CustomQueryHandler` is registered using  `registerCustomQueryHandler` a corresponding Puppeteer-level handler is created through `makeQueryHandler` by wrapping the page functions as appropriate.
The internal query handlers (defined by the interface `QueryHandler`) contain two new functions: `waitFor` and `queryAllArray`.
- `waitFor` allows page-based handlers to make use of the `WaitTask`-backed implementation in `DOMWorld`, whereas purely Puppeteer-based handlers can define an alternative approach instead.
- `queryAllArray` is similar to `queryAll` but with a slightly different interface; it returns a `JSHandle` to an array with the results as opposed to an array of `ElementHandle`. It is used by `$$eval`. 

After this change, we can introduce built-in query handlers that are not executed in the page context (#6307).
2020-09-23 16:02:22 +02:00
..
Accessibility.ts fix: revise interesting classification for AXNodes (#6334) 2020-08-14 14:18:46 +02:00
assert.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
Browser.ts feat(permissions): Add idle-detection permission (#6438) 2020-09-22 10:55:31 +02:00
Connection.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
ConnectionTransport.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
ConsoleMessage.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Coverage.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Debug.ts fix: configure debug logging in browser (#6210) 2020-07-20 11:05:12 +01:00
DeviceDescriptors.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
Dialog.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
DOMWorld.ts feat(a11y-query): introduce internal handlers (#6437) 2020-09-23 16:02:22 +02:00
EmulationManager.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Errors.ts docs(new): migrate TimeoutError to TSDoc (#6062) 2020-06-22 10:34:57 +02:00
EvalTypes.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
EventEmitter.ts chore: vendor Mitt & update project structure (#6209) 2020-07-14 16:57:29 +01:00
Events.ts chore: migrate NetworkManager events (#6174) 2020-07-07 16:43:55 +01:00
ExecutionContext.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
FileChooser.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
FrameManager.ts feat(OOPIF): debug message in case of iFrame moved to another process (#6432) 2020-09-21 13:23:36 +02:00
helper.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
HTTPRequest.ts feat(chromium): roll Chromium to r800071 (#6407) 2020-09-09 21:23:46 +02:00
HTTPResponse.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Input.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
JSHandle.ts feat(a11y-query): introduce internal handlers (#6437) 2020-09-23 16:02:22 +02:00
LifecycleWatcher.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
NetworkManager.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Page.ts chore: remove mime dependency (#6415) 2020-09-14 13:39:33 +02:00
PDFOptions.ts chore(docs): migrate page.pdf() docs (#6228) 2020-07-17 13:58:56 +01:00
Puppeteer.ts feat(a11y-query): introduce internal handlers (#6437) 2020-09-23 16:02:22 +02:00
PuppeteerViewport.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
QueryHandler.ts feat(a11y-query): introduce internal handlers (#6437) 2020-09-23 16:02:22 +02:00
SecurityDetails.ts chore: use devtools-protocol package (#6172) 2020-07-10 11:51:52 +01:00
Target.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
TimeoutSettings.ts chore(docs): fix DOMWorld doc warnings (#6166) 2020-07-06 12:37:16 +01:00
Tracing.ts fix: handle promise for reading protocol stream of trace (#6270) 2020-07-23 16:21:15 +02:00
USKeyboardLayout.ts chore(docs): reduce warnings when generating docs (#6138) 2020-07-02 12:15:39 +01:00
WebSocketTransport.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
WebWorker.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00