aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/document/origin
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/api/document/origin
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/api/document/origin')
-rw-r--r--files/pt-br/web/api/document/origin/index.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/files/pt-br/web/api/document/origin/index.html b/files/pt-br/web/api/document/origin/index.html
new file mode 100644
index 0000000000..b31decf05f
--- /dev/null
+++ b/files/pt-br/web/api/document/origin/index.html
@@ -0,0 +1,60 @@
+---
+title: Document.origin
+slug: Web/API/Document/origin
+translation_of: Web/API/Document/origin
+---
+<div>{{APIRef("DOM")}}{{SeeCompatTable}}</div>
+
+<p>A propriedade read-only <strong><code>Document.origin</code></strong> retorna a origem do documento. Na maioria dos casos, essa propriedade é equivalente a <code>document.defaultView.location.origin</code>.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox">var <var>origin</var> = <var>document</var>.origin;</pre>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<pre class="brush: js">var origin = document.origin;
+// Nesta página, retorna:'https://developer.mozilla.org'
+
+var origin = document.origin;
+// Em "about:blank", retorna:'null'
+
+var origin = document.origin;
+// Em "data:text/html,&lt;b&gt;foo&lt;/b&gt;", retorna:'null'
+</pre>
+
+<h2 id="Especificações">Especificações</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentário</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-document-origin', 'Document.origin')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Definição inicial.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', '#concept-origin', 'origin for various objects (including Document objects)')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Definição inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_entre_navegadores">Compatibilidade entre navegadores</h2>
+
+
+
+<div>{{Compat("api.Document.origin")}}</div>
+
+<h2 id="Veja_também">Veja também </h2>
+
+<ul>
+ <li>A propriedade {{domxref("URLUtils.origin")}}.</li>
+</ul>