From 99efa5cfa34c3f9d38b75352881acdfc99508ebf Mon Sep 17 00:00:00 2001 From: tristantheb Date: Fri, 2 Apr 2021 13:50:14 +0200 Subject: UPDATE: FR-ONLY - Remove all old CompatibilityTable to replace with {{Compat()}} (#311) * UPDATE: Removing CompatibilityTable script - Part 1 * UPDATE: Removing CompatibilityTable script - Part 2 * UPDATE: Removing CompatibilityTable script - Part 3 * UPDATE: Removing CompatibilityTable script - Part 4 * UPDATE: Removing CompatibilityTable script - Part 5/5 * FIX: Repair the EOL of one page * FIX: Fix conflicting file --- files/fr/web/api/document/scripts/index.html | 95 ++++++++++++---------------- 1 file changed, 39 insertions(+), 56 deletions(-) (limited to 'files/fr/web/api/document/scripts') diff --git a/files/fr/web/api/document/scripts/index.html b/files/fr/web/api/document/scripts/index.html index 1e7fe75f40..e6b957e69d 100644 --- a/files/fr/web/api/document/scripts/index.html +++ b/files/fr/web/api/document/scripts/index.html @@ -1,72 +1,55 @@ --- title: Document.scripts slug: Web/API/Document/scripts +tags: + - API + - Document + - HTML DOM + - Property + - Reference translation_of: Web/API/Document/scripts --- -
- {{ApiRef}}
-

 

-

Retourne une liste des scripts (éléments {{HTMLElement("script")}}) présents dans le document. L'objet retourné est une liste du type {{domxref("HTMLCollection")}}.

-

Syntaxe

-
var scriptList = document.scripts;
+
{{ApiRef}}
+ +

Retourne une liste des scripts (éléments {{HTMLElement("script")}}) présents dans le document. L'objet retourné est une liste du type {{domxref("HTMLCollection")}}.

+ +

Syntaxe

+ +
var scriptList = document.scripts;
 
+

La liste scriptList est un objet {{domxref("HTMLCollection")}} qu'on peut utiliser comme un tableau pour accéder aux éléments qu'elle contient.

-

Exemple

+ +

Exemple

+

Cet exemple détecte la présence d'éléments {{HTMLElement("script")}} dans le document.

+
var scripts = document.scripts;
 
 if (scripts.length) {
   alert("This page has scripts!");
 }
 
-

Browser compatibility

-
- {{CompatibilityTable}}
-
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatGeckoDesktop("9.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
-
- + +

Spécifications

+ +
+ + + + + + + - - - - - - - - - - - - - - - - + + + + + -
SpécificationStatutCommentaire
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile("9.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
{{SpecName('HTML WHATWG', '#dom-document-scripts', 'Document.scripts')}}{{ Spec2('HTML WHATWG') }}
-
-

Specification

- + + +

Compatibilité des navigateurs

+ +
{{Compat("api.Document.scripts")}}
-- cgit v1.2.3-54-g00ecf