Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).

The CDATASection interface represents a CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & don’t need escaping as they normally do when inside a CDATA section.

In XML, a CDATA section looks like:

<![CDATA[  ... ]]>

For example:

<foo>Here is a CDATA section: <![CDATA[  < > & ]]> with all kinds of unescaped text. </foo>

The only sequence which is not allowed within a CDATA section is the closing sequence of a CDATA section itself:

<![CDATA[  ]]> will cause an error   ]]>

Note that CDATA sections should not be used within HTML; they only work in XML.

Properties

This interface has no specific properties and implements those of its parent Text.

Methods

This interface has no specific methods and implements those of its parent Text.

Specifications

Specification Status Comment
DOM
The definition of 'CDATASection' in that specification.
Living Standard Re-added in issue #295
Document Object Model (DOM) Level 3 Core Specification
The definition of 'CDATASection' in that specification.
Obsolete No change from Document Object Model (DOM) Level 2 Core Specification
Document Object Model (DOM) Level 2 Core Specification
The definition of 'CDATASection' in that specification.
Obsolete No change from Document Object Model (DOM) Level 1 Specification.
Document Object Model (DOM) Level 1 Specification
The definition of 'CDATASection' in that specification.
Obsolete Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support1 Yes Yes Yes Yes Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes ? ? Yes Yes Yes ?

Метки документа и участники

Метки: 
Внесли вклад в эту страницу: Tigt, ExE-Boss, DomenicDenicola, stevenwdv, teoli, kscarfone, Sheppy, ethertank, Brettz9, Sephr
Обновлялась последний раз: Tigt,