跳至主要內容
版本:23.11.1

ElementHandle.drop() 方法

drop(): Promise<void>

將指定的元素拖放到目前元素上。

簽名

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

參數

參數

類型

描述

this

ElementHandle<Element>

element

ElementHandle<Element>

回傳

Promise<void>

drop(): Promise<void>

警告:此 API 現在已過時。

不再支援。

簽名

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

參數

參數

類型

描述

this

ElementHandle<Element>

data

Protocol.Input.DragData

(選用)

回傳

Promise<void>