diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/api/window/console | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/ru/web/api/window/console')
-rw-r--r-- | files/ru/web/api/window/console/index.html | 53 |
1 files changed, 53 insertions, 0 deletions
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 +--- +<p>{{ APIRef }}</p> + +<p>Свойство <strong><code>window.console</code></strong> дает доступ к интерфейсу {{domxref("Console")}}, предоставляющий методы для вывода информации в консоль браузера. Данные методы предназначены для отладки приложения, и не должны использоваться конечными пользователями.</p> + +<h2 id="Syntax" name="Syntax">Синтаксис</h2> + +<pre class="syntaxbox"><em>var consoleObj</em> = <em>window</em>.console; +</pre> + +<h2 id="Example" name="Example">Примеры</h2> + +<h3 id="Вывод_текста_в_консоль">Вывод текста в консоль</h3> + +<p>Первый пример просто выведет текст в консоль:</p> + +<pre class="brush: js">console.log("An error occurred while loading the content"); +</pre> + +<p>Следующий пример выведет объект в консоль, с возможностью раскрытия отдельных полей:</p> + +<pre class="brush: js">console.dir(someObject);</pre> + +<p>Примеры можно посмотреть по ссылке: {{SectionOnPage("/ru/docs/Web/API/Console", "Usage")}}</p> + +<p> </p> + +<p> </p> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Console API')}}</td> + <td>{{Spec2('Console API')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<div class="note"> +<p>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.</p> +</div> |