2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: ElementHandle.drag
|
|
|
|
---
|
|
|
|
|
|
|
|
# ElementHandle.drag() method
|
|
|
|
|
|
|
|
This method creates and captures a dragevent from the element.
|
|
|
|
|
|
|
|
**Signature:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
class ElementHandle {
|
2022-07-06 07:05:37 +00:00
|
|
|
drag(
|
|
|
|
this: ElementHandle<Element>,
|
|
|
|
target: Point
|
|
|
|
): Promise<Protocol.Input.DragData>;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-07-06 07:05:37 +00:00
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | ------------------------------------------------------------ | ----------- |
|
|
|
|
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
|
|
|
| target | [Point](./puppeteer.point.md) | |
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<Protocol.Input.DragData>
|