Skip to main content
Version: 23.5.0

ElementHandle.drop() 方法

¥ElementHandle.drop() method

drop():Promise<void>

将给定元素放到当前元素上。

¥Drops the given element onto the current one.

签名

¥Signature

class ElementHandle {
drop(
this: ElementHandle<Element>,
element: ElementHandle<Element>
): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

this

ElementHandle<元素>

element

ElementHandle<元素>

Returns:

Promise<void>

drop():Promise<void>

警告:此 API 现已过时。

¥Warning: This API is now obsolete.

不再支持。

¥No longer supported.

签名

¥Signature

class ElementHandle {
drop(
this: ElementHandle<Element>,
data?: Protocol.Input.DragData
): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

this

ElementHandle<元素>

data

Protocol.Input.DragData

(可选的)

Returns:

Promise<void>