puppeteer/src
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
..
common feat(a11y-query): introduce internal handlers (#6437) 2020-09-23 16:02:22 +02:00
node feat(page): emulate idle state (#6410) 2020-09-14 11:31:23 +02:00
.eslintrc.js chore: move code to src/ and emit with TypeScript (#5568) 2020-04-02 16:25:19 +02:00
api-docs-entry.ts chore(docs): migrate page.pdf() docs (#6228) 2020-07-17 13:58:56 +01:00
environment.ts fix: make Node.js environment detection robust w.r.t. JSDOM (#6148) 2020-07-03 10:56:28 +02:00
index-core.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
index.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
initialize.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
install.ts feat: support configuring the browser download path (#6014) 2020-08-10 10:37:31 +02:00
revisions.ts feat(chromium): roll Chromium to r800071 (#6407) 2020-09-09 21:23:46 +02:00
tsconfig.cjs.json chore: vendor Mitt & update project structure (#6209) 2020-07-14 16:57:29 +01:00
tsconfig.esm.json chore: vendor Mitt & update project structure (#6209) 2020-07-14 16:57:29 +01:00