diff options
| author | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-09-26 13:11:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-26 13:11:47 +0200 |
| commit | 6772831200d14c2436aea2d0c837f40dbf12156f (patch) | |
| tree | e41b587ce1834baf8c737454c0ae110ebc8208ca /files/fr/web/api/document/location/index.html | |
| parent | 707941dbecfb0cc1e75dd32d2dacac4d1845bf2c (diff) | |
| download | translated-content-6772831200d14c2436aea2d0c837f40dbf12156f.tar.gz translated-content-6772831200d14c2436aea2d0c837f40dbf12156f.tar.bz2 translated-content-6772831200d14c2436aea2d0c837f40dbf12156f.zip | |
Prepare Web API section for Markdown conversion (#2464)
* Remove summary classes and ids
* Remove unecessary hidden
* Remove useless span filled with useless attributes / ids
* Remove useless font
* Remove notranslate
* Remove id in other elements than headings
* Remove name attributes
* Remove <pre><code> for JS w/ language-js class
* Remove <pre><code> for HTML w/ language-html class
* Remove <pre><code> for other lang w/ language-* class
* Rm highlighted line in code samples
* fix links, internal, external, absolute URLs
* missing file from last commit
* Fix styles errors apart from table + some classes
* Fix notes and warnings (+ some other :x)
* fix typo during merge which broke a doc
* aand forgot a conflict
* fix remaining classes of errors except dls and images
* Fix dls
* Fix images (deki/mozillademos) and remaining style issues
* Remove script tag from svg file
* Remove script tag from svg fileS
* Compress SVG files for CI
Diffstat (limited to 'files/fr/web/api/document/location/index.html')
| -rw-r--r-- | files/fr/web/api/document/location/index.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/files/fr/web/api/document/location/index.html b/files/fr/web/api/document/location/index.html index 932929b720..2a6f3e51c3 100644 --- a/files/fr/web/api/document/location/index.html +++ b/files/fr/web/api/document/location/index.html @@ -10,23 +10,23 @@ tags: - lecture seule translation_of: Web/API/Document/location --- -<p><span style="font-size: 14px; line-height: 1.5;">La propriété en lecture seule </span><strong style="font-size: 14px; line-height: 1.5;"><code>Document.location</code></strong><code style="font-size: 14px;"> renvoie un objet</code><span style="font-size: 14px; line-height: 1.5;"> {{domxref("Location")}}, contenant les informations sur l'URL du document et fournit des moyens pour modifier cette URL ou charger une autre URL.</span></p> +<p>La propriété en lecture seule <strong><code>Document.location</code></strong><code> renvoie un objet</code> {{domxref("Location")}}, contenant les informations sur l'URL du document et fournit des moyens pour modifier cette URL ou charger une autre URL.</p> -<p><span style="font-size: 14px; line-height: 1.5;">Bien que </span><code style="font-size: 14px;">Document.location</code><span style="font-size: 14px; line-height: 1.5;"> soit un objet </span><span style="font-size: 14px; line-height: 1.5;"> </span><code style="font-size: 14px;">Location</code><span style="font-size: 14px; line-height: 1.5;"> en <em>lecture seule</em>, vous pouvez lui assigner un</span><span style="font-size: 14px; line-height: 1.5;"> {{domxref("DOMString")}}. Cela signifie que vous pouvez dans la plupart des cas utiliser document.location comme s'il s'agissait d'une chaîne de caractères: </span><code style="font-size: 14px;">document.location = 'http://www.example.com'</code><span style="font-size: 14px; line-height: 1.5;"> est un synonyme de </span><code style="font-size: 14px;">document.location.href = 'http://www.example.com'</code><span style="font-size: 14px; line-height: 1.5;">.</span></p> +<p>Bien que <code>Document.location</code> soit un objet <code>Location</code> en <em>lecture seule</em>, vous pouvez lui assigner un {{domxref("DOMString")}}. Cela signifie que vous pouvez dans la plupart des cas utiliser document.location comme s'il s'agissait d'une chaîne de caractères: <code>document.location = 'http://www.example.com'</code> est un synonyme de <code>document.location.href = 'http://www.example.com'</code>.</p> -<p><span style="font-size: 14px; line-height: 1.5;">Pour récupérer uniquement l'URL en tant que chaîne de caractères, la propriété </span><span style="font-size: 14px; line-height: 1.5;">{{domxref("document.URL")}} peut également être utilisée.</span></p> +<p>Pour récupérer uniquement l'URL en tant que chaîne de caractères, la propriété {{domxref("document.URL")}} peut également être utilisée.</p> -<p><span style="font-size: 14px; line-height: 1.5;">Si le document courant n'est pas un contexte de navigation, la valeur renvoyée est <em>null</em>.</span></p> +<p>Si le document courant n'est pas un contexte de navigation, la valeur renvoyée est <em>null</em>.</p> -<h2 id="Syntax" name="Syntax">Syntaxe</h2> +<h2 id="Syntax">Syntaxe</h2> -<pre class="syntaxbox notranslate"><em>locationObj</em> = document.location +<pre class="syntaxbox"><em>locationObj</em> = document.location document.location = 'http://www.mozilla.org' // équivalent à document.location.href = 'http://www.mozilla.org' </pre> -<h2 id="Example" name="Example">Exemple</h2> +<h2 id="Example">Exemple</h2> -<pre class="brush: js notranslate">console.log(document.location); +<pre class="brush: js">console.log(document.location); // Affiche un string-like // "http://www.example.com/juicybits.html" dans la console </pre> |
