From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/api/window/console/index.html | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 files/ru/web/api/window/console/index.html (limited to 'files/ru/web/api/window/console') diff --git a/files/ru/web/api/window/console/index.html b/files/ru/web/api/window/console/index.html new file mode 100644 index 0000000000..d6fac2ad19 --- /dev/null +++ b/files/ru/web/api/window/console/index.html @@ -0,0 +1,53 @@ +--- +title: Window.console +slug: Web/API/Window/console +translation_of: Web/API/Window/console +--- +

{{ APIRef }}

+ +

Свойство window.console дает доступ к интерфейсу {{domxref("Console")}}, предоставляющий методы для вывода информации в консоль браузера. Данные методы предназначены для отладки приложения, и не должны использоваться конечными пользователями.

+ +

Синтаксис

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

Примеры

+ +

Вывод текста в консоль

+ +

Первый пример просто выведет текст в консоль:

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

Следующий пример выведет объект в консоль, с возможностью раскрытия отдельных полей:

+ +
console.dir(someObject);
+ +

Примеры можно посмотреть по ссылке: {{SectionOnPage("/ru/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