From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- files/fr/web/api/document/createcomment/index.html | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 files/fr/web/api/document/createcomment/index.html (limited to 'files/fr/web/api/document/createcomment/index.html') diff --git a/files/fr/web/api/document/createcomment/index.html b/files/fr/web/api/document/createcomment/index.html deleted file mode 100644 index 5e16be2ecb..0000000000 --- a/files/fr/web/api/document/createcomment/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: document.createComment -slug: Web/API/Document/createComment -tags: - - API - - DOM - - Méthodes - - Reference -translation_of: Web/API/Document/createComment ---- -
{{APIRef("DOM")}}
- -

createComment() crée et retourne un nouveau noeud de type commentaire.

- -

Syntaxe

- -
CommentNode = document.createComment(data)
-
- -

Paramètres

- -
-
data
-
Une chaîne de caractères représentant le contenu du commentaire.
-
- -

Exemple

- -
var docu = new DOMParser().parseFromString('<xml></xml>',  "application/xml");
-var comment = docu.createComment('Voici un commentaire pas très bien caché');
-
-docu.getElementsByTagName('xml')[0].appendChild(comment);
-
-alert(new XMLSerializer().serializeToString(docu));
-// Affiche: <xml><!--Voici un commentaire pas très bien caché--></xml>
- -

Spécification

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