From 6772831200d14c2436aea2d0c837f40dbf12156f Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Sun, 26 Sep 2021 13:11:47 +0200 Subject: 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
 for JS w/ language-js class

* Remove 
 for HTML w/ language-html class

* Remove 
 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
---
 files/fr/web/api/document/readystate/index.html | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

(limited to 'files/fr/web/api/document/readystate/index.html')

diff --git a/files/fr/web/api/document/readystate/index.html b/files/fr/web/api/document/readystate/index.html
index 57f7b28538..36d01f7c11 100644
--- a/files/fr/web/api/document/readystate/index.html
+++ b/files/fr/web/api/document/readystate/index.html
@@ -16,7 +16,7 @@ translation_of: Web/API/Document/readyState
 
 

Syntaxe

-
var string = document.readyState;
+
var string = document.readyState;
 

Valeurs

@@ -32,11 +32,11 @@ translation_of: Web/API/Document/readyState
Le document et toutes les sous-ressources ont été chargés, et {{event("load")}} a été émis.
-

Exemples

+

Exemples

Différents états de chargement

-
switch (document.readyState) {
+
switch (document.readyState) {
   case "loading":
     // Encore en chargement.
     break;
@@ -50,12 +50,12 @@ translation_of: Web/API/Document/readyState
     // La page est pleinement chargée.
     console.log("The first CSS rule is: " + document.styleSheets[0].cssRules[0].cssText);
     break;
-}
+}
 

readystatechange comme alternative à  DOMContentLoaded

-
// alternative à DOMContentLoaded
+
// alternative à DOMContentLoaded
 document.onreadystatechange = function () {
   if (document.readyState == "interactive") {
     initApplication();
@@ -64,7 +64,7 @@ document.onreadystatechange = function () {
 
 

readystatechange comme alternative à load

-
// alternative à load
+
// alternative à load
 document.onreadystatechange = function () {
   if (document.readyState == "complete") {
     initApplication();
@@ -73,7 +73,7 @@ document.onreadystatechange = function () {
 
 

readystatechange comme event listener pour insérer ou modifier le DOM avant DOMContentLoaded

-
// Modification du document <body> dès que possible en utilisant un script externe
+
// Modification du document <body> dès que possible en utilisant un script externe
 var bootstrap = function(evt){
   if (evt.target.readyState === "interactive") { initLoader(); }
   else if (evt.target.readyState === "complete") { initApp(); }
@@ -83,7 +83,7 @@ document.addEventListener('readystatechange', bootstrap, false);
 
 

Spécifications

- +
@@ -110,12 +110,8 @@ document.addEventListener('readystatechange', bootstrap, false);

Compatibilité des navigateurs

- -
{{Compat("api.Document.readyState")}}
-
-

[1] Ne supporte que 'complete'. Opera Presto notifie 'complete' seulement après l'événement 'load' (dans un ordre incorrect par rapport à la spécification du standard HTML5).

[2] Internet Explorer 9 et 10 ont des bogues quand l'état 'interactive' peut être notifié trop tôt avant que le document soit entièrement analysé.

-- cgit v1.2.3-54-g00ecf
Spécifications