mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(new): migrate Page.ts to TSDoc (part 0 / 2) (#6104)
* docs(new): migrate Page.ts to TSDoc (part 0 / 2) Co-authored-by: Changhao Han <changhaohan@chromium.org>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
## Page.$() method
|
||||
|
||||
Runs `document.querySelector` within the page. If no element matches the selector, the return value resolves to `null`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@@ -14,9 +16,13 @@ $(selector: string): Promise<ElementHandle | null>;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| selector | string | |
|
||||
| selector | string | A [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) to query page for. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<[ElementHandle](./puppeteer.elementhandle.md) \| null>
|
||||
|
||||
## Remarks
|
||||
|
||||
Shortcut for [Page.mainFrame().$(selector)](./puppeteer.frame._.md)<!-- -->.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user