2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: JSHandle.asElement
|
|
|
|
---
|
|
|
|
|
|
|
|
# JSHandle.asElement() method
|
|
|
|
|
2023-03-30 11:54:00 +00:00
|
|
|
Either `null` or the handle itself if the handle is an instance of [ElementHandle](./puppeteer.elementhandle.md).
|
|
|
|
|
2022-10-24 07:07:05 +00:00
|
|
|
#### Signature:
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class JSHandle {
|
2023-08-23 16:00:34 +00:00
|
|
|
abstract asElement(): ElementHandle<Node> | null;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2022-07-06 07:05:37 +00:00
|
|
|
[ElementHandle](./puppeteer.elementhandle.md)<Node> \| null
|