Movatterモバイル変換


[0]ホーム

URL:


  1. 開発者向けのウェブ技術
  2. Web API
  3. Document
  4. hidden

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docsコミュニティーについてもっと知り、仲間になるにはこちらから。

View in EnglishAlways switch to English

Document: hidden プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

Document.hidden は読み取り専用のプロパティで、ページが非表示になっているとみられるかどうかを示す論理値を返します。

ページが非表示であるかどうかを判断する代替方法としては、Document.visibilityState プロパティもあります。

論理値です。ページが非表示の場合はtrue、そうでなければfalse です。

js
document.addEventListener("visibilitychange", () => {  console.log(document.hidden);  // 動作を変更...});

仕様書

Specification
HTML
# dom-document-hidden

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp