aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/document/createcdatasection/index.html
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-10-02 17:20:14 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-02 17:30:20 +0200
commitc05efa8d7ae464235cf83d7c0956e42dc6974103 (patch)
tree6ea911b2f2010f63a026de6bb7a1a51e7690a7e1 /files/fr/web/api/document/createcdatasection/index.html
parent13a5e017558b248ee1647d4a5825f183b51f09ad (diff)
downloadtranslated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.gz
translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.bz2
translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/api/document/createcdatasection/index.html')
-rw-r--r--files/fr/web/api/document/createcdatasection/index.html52
1 files changed, 0 insertions, 52 deletions
diff --git a/files/fr/web/api/document/createcdatasection/index.html b/files/fr/web/api/document/createcdatasection/index.html
deleted file mode 100644
index f1a44c9a07..0000000000
--- a/files/fr/web/api/document/createcdatasection/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
----
-title: Document.createCDATASection()
-slug: Web/API/Document/createCDATASection
-tags:
- - API
- - Création
- - DOM
- - Document
- - Méthode
- - Section
- - XML
- - données
-translation_of: Web/API/Document/createCDATASection
----
-<div>{{APIRef("DOM")}}</div>
-
-<p><code>createCDATASection()</code> crée un nouveau noeud de section CDATA et le renvoie.</p>
-
-<h2 id="Syntax">Syntaxe</h2>
-
-<pre class="syntaxbox"><var>CDATASectionNode</var> = document.createCDATASection(data)
-</pre>
-
-<ul>
- <li><code>CDATASectionNode</code> est un noeud de <a href="/fr/docs/Web/API/CDATASection">Section CDATA</a>.</li>
- <li><code>data</code> est une string (<em>chaîne de caractères</em>) contenant les données à ajouter à la section CDATA.</li>
-</ul>
-
-<h2 id="Example">Exemple</h2>
-
-<pre class="brush:js">var docu = new DOMParser().parseFromString('&lt;xml&gt;&lt;/xml&gt;', "application/xml")
-
-var cdata = docu.createCDATASection('Some &lt;CDATA&gt; data &amp; then some');
-
-docu.getElementsByTagName('xml')[0].appendChild(cdata);
-
-alert(new XMLSerializer().serializeToString(docu));
-// Affiche : &lt;xml&gt;&lt;![CDATA[Some &lt;CDATA&gt; data &amp; then some]]&gt;&lt;/xml&gt;
-</pre>
-
-<h2 id="Notes">Notes</h2>
-
-<ul>
- <li>Cela fonctionnera uniquement avec XML, pas avec les documents HTML (car les documents HTML ne supportent pas les sections CDATA) ; le tenter sur un document HTML va lancer une exception <code>NOT_SUPPORTED_ERR</code>.</li>
- <li>Va lancer une exception <code>NS_ERROR_DOM_INVALID_CHARACTER_ERR</code> si on essaye de soumettre la séquence CDATA de fermeture ("]]&gt;") en tant que partie des données ; les données fournies par l'utilisateur non échappées, ne peuvent pas être utilisées en toute sécurité sans qu'avec cette méthode on obtienne cette exception (<code><a href="/en-US/docs/DOM/document.createTextNode">createTextNode()</a></code> peut souvent être utilisé à sa place).</li>
-</ul>
-
-<h2 id="Specification">Spécification</h2>
-
-<ul>
- <li><a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#method-createCDATASection">createCDATASection</a></li>
-</ul>