跳至主要內容
版本:23.11.1

ElementHandle.contentFrame() 方法

contentFrame(): Promise<Frame>

解析與元素相關聯的 frame,如果有的話。HTMLIFrameElements 永遠存在。

簽名

class ElementHandle {
abstract contentFrame(this: ElementHandle<HTMLIFrameElement>): Promise<Frame>;
}

參數

參數

類型

描述

this

ElementHandle<HTMLIFrameElement>

返回

Promise<Frame>

contentFrame(): Promise<Frame | null>

簽名

class ElementHandle {
abstract contentFrame(): Promise<Frame | null>;
}

返回

Promise<Frame | null>