From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/api/attr/prefix/index.html | 117 ++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 files/fr/web/api/attr/prefix/index.html (limited to 'files/fr/web/api/attr/prefix') diff --git a/files/fr/web/api/attr/prefix/index.html b/files/fr/web/api/attr/prefix/index.html new file mode 100644 index 0000000000..1749174b01 --- /dev/null +++ b/files/fr/web/api/attr/prefix/index.html @@ -0,0 +1,117 @@ +--- +title: Attr.prefix +slug: Web/API/Attr/prefix +tags: + - API + - DOM + - Propriétés + - Reference +translation_of: Web/API/Attr/prefix +--- +
{{APIRef("DOM")}}
+ +

La propriété Attr.prefix en lecture seule renvoie le préfixe de l'espace de noms de l'attribut spécifié ou null si aucun préfixe n'est spécifié

+ +
+

Avant DOM4, cette API a été définie dans l'interface {{domxref ("Node")}}.

+
+ +

Syntaxe

+ +
string = attribute.prefix
+
+ +

Exemples

+ +

Le code suivant affiche "x" dans la console.

+ +
<div x:id="example" onclick="console.log(this.attributes[0].prefix)"/>
+
+ +

Notes

+ +

Cela ne fonctionnera que lorsqu'un analyseur conscient de l'espace de noms est utilisé, c'est-à-dire lorsqu'il s'agit d'un document avec un type MIME XML. Cela ne fonctionnera pas pour les documents HTML.

+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName("DOM4", "#dom-attr-prefix", "Attr.prefix")}}{{Spec2("DOM4")}}Définition initiale
+ +

Compatibilité des navigateurs

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FonctionnalitéChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support46.0[1]{{CompatVersionUnknown}}{{CompatGeckoDesktop("48.0")}}[1]{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FonctionnalitéAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("48.0")}}[1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] Cet API était auparavant disponible sur l'API {{domxref("Node")}}.

+ +

Voir également

+ + -- cgit v1.2.3-54-g00ecf