Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 455443 of DocumentType

  • Revision slug: Web/API/DocumentType
  • Revision title: DocumentType
  • Revision id: 455443
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

The DocumentType interface represents a {{domxref("Node")}} containing a doctype.

Properties

Inherits properties from its parent, {{domxref("Node")}}, and implements the {{domxref("ChildNode")}} interface.

 
{{domxref("DocumentType.entities")}} {{readonlyInline}} {{deprecated_Inline}}
...
{{domxref("DocumentType.internalSubset")}} {{readonlyInline}} {{deprecated_Inline}}
...
{{domxref("DocumentType.name")}} {{readonlyInline}}
...
{{domxref("DocumentType.notations")}} {{readonlyInline}} {{deprecated_Inline}}
...
{{domxref("ChildNode.nextElementSibling")}} {{readonlyInline}}
Returns the {{domxref("Element")}} immediately following the specified one in its parent's children list, or null if the specified element is the first one in the list.
{{domxref("DocumentType.publicId")}} {{readonlyInline}}
...
{{domxref("ChildNode.previousElementSibling")}} {{readonlyInline}}
Returns the {{domxref("Element")}} immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
{{domxref("DocumentType.systemId")}} {{readonlyInline}}
...

Methods

Inherits methods from its parent, {{domxref("Node")}}, and implements the {{domxref("ChildNode")}} interface.

{{domxref("ChildNode.remove")}} {{experimental_inline}}
Removes the object from its parent children list.

Specifications

Specification Status Comment
{{SpecName('DOM WHATWG', '#documenttype', 'DocumentType')}} {{Spec2('DOM WHATWG')}} Added implemention of the {{domxref("ChildNode")}} interface.
Removed the internalSubset, entities, and notation properties.
{{SpecName('DOM3 Core', 'core.html#ID-412266927', 'DocumentType')}} {{Spec2('DOM3 Core')}} No change from {{SpecName('DOM2 Core')}}.
{{SpecName('DOM2 Core', 'core.html#ID-412266927', 'CharacterData')}} {{Spec2('DOM2 Core')}} Added the publicID, systemID, and internalSubset properties.
{{SpecName('DOM1', 'level-one-core.html#ID-412266927', 'CharacterData')}} {{Spec2('DOM1')}} Initial definition.

Browser Compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{CompatGeckoDesktop("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
entities and notations 1.0 [1] {{CompatGeckoDesktop("1.0")}}
Removed in {{CompatGeckoDesktop("6.0")}}
{{CompatUnknown}} {{CompatVersionUnknown}} [1] {{CompatVersionUnknown}}
Implements {{domxref("ChildNode")}} 29.0 {{CompatGeckoDesktop("25.0")}} {{CompatNo}} 16.0 {{CompatNo}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoMobile("1.0")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
entities and notations {{CompatVersionUnknown}} [1] {{CompatGeckoMobile("1.0")}}
Removed in {{CompatGeckoMobile("6.0")}}
{{CompatUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Implements {{domxref("ChildNode")}} 29.0 {{CompatGeckoMobile("25.0")}} {{CompatNo}} 16.0 {{CompatNo}}

[1] The Chromium project plans to drop supports for the internalSubset, entities and notations methods.

See also

Revision Source

<p>The <strong><code>DocumentType</code></strong> interface represents a {{domxref("Node")}} containing a doctype.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<p><em>Inherits properties from its parent, {{domxref("Node")}}, and implements the {{domxref("ChildNode")}} interface.</em></p>
<dl>
  <dt>
    &nbsp;</dt>
  <dt>
    {{domxref("DocumentType.entities")}} {{readonlyInline}} {{deprecated_Inline}}</dt>
  <dd>
    ...</dd>
  <dt>
    {{domxref("DocumentType.internalSubset")}} {{readonlyInline}} {{deprecated_Inline}}</dt>
  <dd>
    ...</dd>
  <dt>
    {{domxref("DocumentType.name")}} {{readonlyInline}}</dt>
  <dd>
    ...</dd>
  <dt>
    {{domxref("DocumentType.notations")}} {{readonlyInline}} {{deprecated_Inline}}</dt>
  <dd>
    ...</dd>
  <dt>
    {{domxref("ChildNode.nextElementSibling")}} {{readonlyInline}}</dt>
  <dd>
    Returns the {{domxref("Element")}} immediately following the specified one in its parent's children list, or <code>null</code> if the specified element is the first one in the list.</dd>
  <dt>
    {{domxref("DocumentType.publicId")}} {{readonlyInline}}</dt>
  <dd>
    ...</dd>
  <dt>
    {{domxref("ChildNode.previousElementSibling")}} {{readonlyInline}}</dt>
  <dd>
    Returns the {{domxref("Element")}} immediately prior to the specified one in its parent's children list, or <code>null</code> if the specified element is the first one in the list.</dd>
  <dt>
    {{domxref("DocumentType.systemId")}} {{readonlyInline}}</dt>
  <dd>
    ...</dd>
</dl>
<h2 id="Specification" name="Specification">Methods</h2>
<p><em>Inherits methods from its parent, {{domxref("Node")}}, and implements the {{domxref("ChildNode")}} interface.</em></p>
<dl>
  <dt>
    {{domxref("ChildNode.remove")}} {{experimental_inline}}</dt>
  <dd>
    Removes the object from its parent children list.</dd>
</dl>
<h2 id="Specification" name="Specification">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('DOM WHATWG', '#documenttype', 'DocumentType')}}</td>
      <td>{{Spec2('DOM WHATWG')}}</td>
      <td>Added implemention of the {{domxref("ChildNode")}} interface.<br />
        Removed the <code>internalSubset</code>, <code>entities</code>, and <code>notation</code> properties.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM3 Core', 'core.html#ID-412266927', 'DocumentType')}}</td>
      <td>{{Spec2('DOM3 Core')}}</td>
      <td>No change from {{SpecName('DOM2 Core')}}.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Core', 'core.html#ID-412266927', 'CharacterData')}}</td>
      <td>{{Spec2('DOM2 Core')}}</td>
      <td>Added the <code>publicID</code>, <code>systemID</code>, and <code>internalSubset</code> properties.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM1', 'level-one-core.html#ID-412266927', 'CharacterData')}}</td>
      <td>{{Spec2('DOM1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_Compatibility">Browser Compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1.0")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>entities</code> and <code>notations</code></td>
        <td>1.0 [1]</td>
        <td>{{CompatGeckoDesktop("1.0")}}<br />
          Removed in {{CompatGeckoDesktop("6.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}} [1]</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td>Implements {{domxref("ChildNode")}}</td>
        <td>29.0</td>
        <td>{{CompatGeckoDesktop("25.0")}}</td>
        <td>{{CompatNo}}</td>
        <td>16.0</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoMobile("1.0")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>entities</code> and <code>notations</code></td>
        <td>{{CompatVersionUnknown}} [1]</td>
        <td>{{CompatGeckoMobile("1.0")}}<br />
          Removed in {{CompatGeckoMobile("6.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td>Implements {{domxref("ChildNode")}}</td>
        <td>29.0</td>
        <td>{{CompatGeckoMobile("25.0")}}</td>
        <td>{{CompatNo}}</td>
        <td>16.0</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] The Chromium project plans to drop supports for the <code>internalSubset</code>, <code>entities</code> and <code>notations</code> methods.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/DOM/DOM_Reference" title="/en-US/docs/DOM/DOM_Reference">The DOM interfaces index.</a></li>
</ul>
Revert to this revision