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/console/index.html | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 files/ja/web/api/window/console/index.html (limited to 'files/ja/web/api/window/console/index.html') diff --git a/files/ja/web/api/window/console/index.html b/files/ja/web/api/window/console/index.html new file mode 100644 index 0000000000..4e37459fed --- /dev/null +++ b/files/ja/web/api/window/console/index.html @@ -0,0 +1,48 @@ +--- +title: Window.console +slug: Web/API/Window/console +translation_of: Web/API/Window/console +--- +

{{ APIRef }}

+ +

読み取り専用プロパティのWindow.consoleは、ブラウザのコンソールへ情報を出力するメソッドを提供する{{domxref("Console")}}オブジェクトへの参照を返します。これらのメソッドで出力される情報はデバッグ目的のものであり、ユーザーへ情報を提示するために使われるべきではありません。

+ +

Syntax

+ +
var consoleObj = window.console;
+
+ +

Examples

+ +

Logging to console

+ +

一つ目の例はテキストをコンソールに出力します。

+ +
console.log("An error occurred while loading the content");
+ +

次の例では開閉ウィジェットによって要素が展開可能な状態でオブジェクトをコンソールに出力します。

+ +
console.dir(someObject);
+ +

より詳細な例については{{SectionOnPage("/en-US/docs/Web/API/Console", "Usage")}}をご参照下さい。

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Console API')}}{{Spec2('Console API')}}Initial definition.
+ +
+

Currently there are many implementation differences among browsers, but work is being done to bring them together and make them more consistent with one another.

+
-- cgit v1.2.3-54-g00ecf