puppeteer/src/common
Jack Franklin b349c91e7d
fix: make $ and $$ selectors generic (#6883)
* fix: make `$` and `$$` selectors generic

This means, much like TS's in built `querySelector` type, you can now do:

```ts
const listItems = page.$$<HTMLLIElement>('ul li');
```

And/or:

```ts
const h2 = page.$<HTMLHeadingElement>('h2');
```

And the return value will be of type `ElementHandle<T>|null`, where `T`
is the type you provided. By default `T` is an `Element`, so you don't
have to provide this if you don't care as a consumer about the exact
type you get back.

* chore: fix test assertions
2021-03-25 11:40:34 +00:00
..
Accessibility.ts fix: revise interesting classification for AXNodes (#6334) 2020-08-14 14:18:46 +02:00
AriaQueryHandler.ts chore(src): fix minor typo (#6961) 2021-03-09 09:01:09 +01:00
assert.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
Browser.ts fix(typescript): allow defaultViewport to be 'null' (#6942) 2021-03-24 12:14:06 +01:00
BrowserConnector.ts fix(typescript): allow defaultViewport to be 'null' (#6942) 2021-03-24 12:14:06 +01:00
BrowserWebSocketTransport.ts chore(agnostification): agnostify web socket connections (#6520) 2020-10-19 10:32:41 +01:00
Connection.ts chore: update eslint & eslint plugins (#6487) 2020-10-12 10:30:35 +01:00
ConnectionTransport.ts chore: create common directory (#6042) 2020-06-18 15:53:23 +01:00
ConsoleMessage.ts feat(console): expose stack trace for console messages (#6445) 2020-09-25 15:27:13 +02: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 feat: add iPhone 11 models to DeviceDescriptors (#6467) 2021-01-08 10:13:45 +01:00
Dialog.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
DOMWorld.ts fix: make $ and $$ selectors generic (#6883) 2021-03-25 11:40:34 +00:00
EmulationManager.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Errors.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
EvalTypes.ts fix: much better TypeScript definitions (#6837) 2021-02-09 08:00:42 +00: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 fix(domworld): fix waitfor bindings (#6766) (#6775) 2021-01-25 13:01:59 +01:00
fetch.ts chore(agnostification): split up launcher class (#6484) 2020-10-12 10:08:57 +01:00
FileChooser.ts fix(filechooser): cancel is sync (#6937) 2021-03-02 15:27:11 +01:00
FrameManager.ts fix: make $ and $$ selectors generic (#6883) 2021-03-25 11:40:34 +00:00
helper.ts feat: support promise as return value for page.waitForResponse predicate (#6624) 2020-11-25 11:35:47 +01:00
HTTPRequest.ts fix: type page event listeners correctly (#6891) 2021-03-25 11:26:35 +00:00
HTTPResponse.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Input.ts feat(chromium): roll Chromium to r818858 (#6526) 2020-10-27 18:15:52 +01:00
JSHandle.ts fix: make $ and $$ selectors generic (#6883) 2021-03-25 11:40:34 +00:00
LifecycleWatcher.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
NetworkConditions.ts fix: wider compat TS types and CI checks to ensure correct type defs (#6855) 2021-02-10 12:04:36 +00:00
NetworkManager.ts feat(network): request interception and caching compatibility (#6996) 2021-03-17 15:42:35 +01:00
Page.ts fix: make $ and $$ selectors generic (#6883) 2021-03-25 11:40:34 +00:00
PDFOptions.ts feat(page): add omitBackground option for page.pdf method (#6981) 2021-03-18 19:57:32 +00:00
Product.ts chore(agnostification): split up launcher class (#6484) 2020-10-12 10:08:57 +01:00
Puppeteer.ts fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
PuppeteerViewport.ts fix: expose Viewport type (#6881) 2021-02-12 12:32:27 +00:00
QueryHandler.ts chore: mark version v5.4.0 (#6542) 2020-10-23 16:28:38 +02:00
SecurityDetails.ts chore: use devtools-protocol package (#6172) 2020-07-10 11:51:52 +01:00
Target.ts fix(common): fix generic type of _isClosedPromise (#6579) 2020-11-04 07:42:23 +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
WebWorker.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00