puppeteer/website/versioned_docs/version-22.10.0/api/puppeteer.elementhandle.focus.md

20 lines
295 B
Markdown
Raw Permalink Normal View History

---
sidebar_label: ElementHandle.focus
---
# ElementHandle.focus() method
Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
2022-10-24 14:31:12 +00:00
#### Signature:
```typescript
class ElementHandle {
focus(): Promise<void>;
}
```
**Returns:**
Promise&lt;void&gt;