本文へスキップ
バージョン: 22.5.0

ElementHandle.isIntersectingViewport() メソッド

要素が現在のビューポートに表示されている場合、true を返します。要素が SVG の場合、代わりに SVG の所有者要素がビューポート内にあるかどうかをチェックします。詳細は https://crbug.com/963246 を参照してください。

シグネチャ:

class ElementHandle {
isIntersectingViewport(
this: ElementHandle<Element>,
options?: {
threshold?: number;
}
): Promise<boolean>;
}

パラメータ

パラメータ説明
thisElementHandle<Element>
options{ threshold?: number; }(オプション) 0(交差なし)から 1(完全交差)の間の交差の閾値。デフォルトは 1 です。

戻り値

Promise<boolean>