aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/document/origin
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/document/origin')
-rw-r--r--files/fr/web/api/document/origin/index.md60
1 files changed, 22 insertions, 38 deletions
diff --git a/files/fr/web/api/document/origin/index.md b/files/fr/web/api/document/origin/index.md
index 646f4e1242..326c3eef82 100644
--- a/files/fr/web/api/document/origin/index.md
+++ b/files/fr/web/api/document/origin/index.md
@@ -9,50 +9,34 @@ tags:
- origine
translation_of: Web/API/Document/origin
---
-<div>{{APIRef("DOM")}}{{SeeCompatTable}}</div>
+{{APIRef("DOM")}}{{SeeCompatTable}}
-<p>La propriété en lecture seule <strong><code>Document.origin</code></strong> renvoie l'origine du document. Dans la plupart des cas, cette propriété est équivalente à  <code>document.defaultView.location.origin</code>.</p>
+La propriété en lecture seule **`Document.origin`** renvoie l'origine du document. Dans la plupart des cas, cette propriété est équivalente à  `document.defaultView.location.origin`.
-<h2 id="Exemples">Exemples</h2>
+## Exemples
-<pre class="brush: js">var origin = document.origin;
+```js
+var origin = document.origin;
// Sur cette page, renvoie:'https://developer.mozilla.org'
var origin = document.origin;
// Sur "about:blank", renvoie :'null'
var origin = document.origin;
-// Sur "data:text/html,&lt;b&gt;foo&lt;/b&gt;", renvoie :'null'
-</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <tbody>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">Statut</th>
- <th scope="col">Commentaire</th>
- </tr>
- <tr>
- <td>{{SpecName('DOM WHATWG', '#dom-document-origin', 'Document.origin')}}</td>
- <td>{{Spec2('DOM WHATWG')}}</td>
- <td>Définition initiale.</td>
- </tr>
- <tr>
- <td>{{SpecName('HTML WHATWG', '#origin:document', 'origin for Document objects')}}</td>
- <td>{{Spec2('HTML WHATWG')}}</td>
- <td>Définition initiale.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<div>{{Compat("api.Document.origin")}}</div>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<ul>
- <li>La propriété {{domxref("URLUtils.origin")}}.</li>
-</ul>
+// Sur "data:text/html,<b>foo</b>", renvoie :'null'
+```
+
+## Spécifications
+
+| Spécification | Statut | Commentaire |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------- |
+| {{SpecName('DOM WHATWG', '#dom-document-origin', 'Document.origin')}} | {{Spec2('DOM WHATWG')}} | Définition initiale. |
+| {{SpecName('HTML WHATWG', '#origin:document', 'origin for Document objects')}} | {{Spec2('HTML WHATWG')}} | Définition initiale. |
+
+## Compatibilité des navigateurs
+
+{{Compat("api.Document.origin")}}
+
+## Voir aussi
+
+- La propriété {{domxref("URLUtils.origin")}}.