Skip to main content
Version: 23.2.0

ElementHandle.scrollIntoView() 方法

¥ElementHandle.scrollIntoView() method

使用自动化协议客户端或通过调用 element.scrollIntoView 将元素滚动到视图中。

¥Scrolls the element into view using either the automation protocol client or by calling element.scrollIntoView.

签名

¥Signature

class ElementHandle {
scrollIntoView(this: ElementHandle<Element>): Promise<void>;
}

参数

¥Parameters

范围

类型

描述

this

ElementHandle<元素>

Returns:

Promise<void>