JSHandle.asElement() 方法
🌐 JSHandle.asElement() method
如果 handle 是 ElementHandle 的实例,则为 null 或 handle 本身。
🌐 Either null or the handle itself if the handle is an instance of ElementHandle.
语法
🌐 Signature
class JSHandle {
abstract asElement(): ElementHandle<Node> | null;
}
返回:
ElementHandle<节点> | 空