From 1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:24 +0200 Subject: convert content to md --- files/fr/web/api/document/origin/index.md | 60 ++++++++++++------------------- 1 file changed, 22 insertions(+), 38 deletions(-) (limited to 'files/fr/web/api/document/origin') 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 --- -
{{APIRef("DOM")}}{{SeeCompatTable}}
+{{APIRef("DOM")}}{{SeeCompatTable}} -

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.

+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`. -

Exemples

+## Exemples -
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,<b>foo</b>", renvoie :'null'
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{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

- - +// Sur "data:text/html,foo", 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")}}. -- cgit v1.2.3-54-g00ecf