From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/window/screen/index.html | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/ja/web/api/window/screen/index.html (limited to 'files/ja/web/api/window/screen') diff --git a/files/ja/web/api/window/screen/index.html b/files/ja/web/api/window/screen/index.html new file mode 100644 index 0000000000..a78bf0e563 --- /dev/null +++ b/files/ja/web/api/window/screen/index.html @@ -0,0 +1,52 @@ +--- +title: Window.screen +slug: Web/API/Window/screen +tags: + - API + - CSSOM View + - HTML DOM + - Property + - Window +translation_of: Web/API/Window/screen +--- +

{{APIRef("CSSOM")}}

+ +

{{DOMxRef("Window")}} の screen プロパティは、ウィンドウに関連付けられた画面オブジェクトへの参照を返します。 screen オブジェクトは {{DOMxRef("Screen")}} インターフェースを実装しており、現在のウィンドウがレンダリングされている画面のプロパティを検査するための特別なオブジェクトです。

+ +

構文

+ +
let screenObj = window.screen;
+ +

+ +
if (screen.pixelDepth < 8) {
+  // use low-color version of page
+} else {
+  // use regular, colorful page
+}
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSSOM View', '#dom-window-screen', 'window.screen')}}{{Spec2('CSSOM View')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Window.screen")}}

-- cgit v1.2.3-54-g00ecf