2022-08-06 14:49:20 +00:00
|
|
|
---
|
|
|
|
sidebar_label: JSHandle.asElement
|
|
|
|
---
|
|
|
|
|
|
|
|
# JSHandle.asElement() method
|
|
|
|
|
2023-04-03 08:23:08 +00:00
|
|
|
Either `null` or the handle itself if the handle is an instance of [ElementHandle](./puppeteer.elementhandle.md).
|
|
|
|
|
2022-10-24 14:31:12 +00:00
|
|
|
#### Signature:
|
2022-08-06 14:49:20 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class JSHandle {
|
2023-08-28 13:34:38 +00:00
|
|
|
abstract asElement(): ElementHandle<Node> | null;
|
2022-08-06 14:49:20 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
[ElementHandle](./puppeteer.elementhandle.md)<Node> \| null
|