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/navigator/devicememory/index.html | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 files/ja/web/api/navigator/devicememory/index.html (limited to 'files/ja/web/api/navigator/devicememory') diff --git a/files/ja/web/api/navigator/devicememory/index.html b/files/ja/web/api/navigator/devicememory/index.html new file mode 100644 index 0000000000..8a307e45f6 --- /dev/null +++ b/files/ja/web/api/navigator/devicememory/index.html @@ -0,0 +1,62 @@ +--- +title: Navigator.deviceMemory +slug: Web/API/Navigator/deviceMemory +tags: + - API + - Device Memory API + - Navigator + - Property + - Reference + - deviceMemory + - memory +translation_of: Web/API/Navigator/deviceMemory +--- +
{{APIRef("Device Memory")}}{{securecontext_header}}{{SeeCompatTable}}
+ +

deviceMemory は {{domxref("Navigator")}} インターフェイスの読み取り専用プロパティで、端末のおよそのメモリ量をギガバイト単位で返します。この値は概数で、最も近い2の指数に切り下げ、1024で割った数字になります。また、とても低性能または高性能の端末を使用している人のプライバシーを守るため、上限値と下限値が使用されます。

+ +

構文

+ +
memoryAmount = navigator.deviceMemory
+ +

+ +

浮動小数点値で 0.25, 0.5, 1, 2, 4, 8 のうちのいずれかです。

+ +

+ +
const memory = navigator.deviceMemory
+console.log (`This device has at least ${memory}GiB of RAM.`)
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("Device Memory","#sec-device-memory-js-api","deviceMemory")}}{{Spec2("Device Memory")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Navigator.deviceMemory")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf