aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/web/api/window/console/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pt-pt/web/api/window/console/index.html')
-rw-r--r--files/pt-pt/web/api/window/console/index.html56
1 files changed, 56 insertions, 0 deletions
diff --git a/files/pt-pt/web/api/window/console/index.html b/files/pt-pt/web/api/window/console/index.html
new file mode 100644
index 0000000000..80abc2170c
--- /dev/null
+++ b/files/pt-pt/web/api/window/console/index.html
@@ -0,0 +1,56 @@
+---
+title: Window.console
+slug: Web/API/Window/console
+tags:
+ - API
+ - Consola
+ - Referencia
+ - Só-de-leitura
+ - Window
+ - console
+translation_of: Web/API/Window/console
+---
+<p>{{ APIRef }}</p>
+
+<p>A propriedade só-de-leitura <em><strong><code>Window.console</code></strong></em> devolve uma referência para o objeto {{domxref("Console")}}, que fornece métodos para registar informação na <em>console </em>do navegador. Estes métodos são destinados apenas para fins de depuração e não deverão ser invocados para apresentar informação aos utilizadores finais.</p>
+
+<h2 id="Syntax" name="Syntax">Sintaxe</h2>
+
+<pre class="syntaxbox"><em>var consoleObj</em> = <em>window</em>.console;
+</pre>
+
+<h2 id="Example" name="Example">Exemplos</h2>
+
+<h3 id="Registar_para_console">Registar para console</h3>
+
+<p>The first example logs text to the console.</p>
+
+<pre class="brush: js">console.log("An error occurred while loading the content");
+</pre>
+
+<p>The next example logs an object to the console, with the object's fields expandable using disclosure widgets:</p>
+
+<pre class="brush: js">console.dir(someObject);</pre>
+
+<p>See {{SectionOnPage("/en-US/docs/Web/API/Console", "Usage")}} for more thorough examples.</p>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Comentário</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>