{{APIRef}}
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("DocumentType.publicId")}} {{readonlyInline}}
- ...
- {{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")}} [1] | {{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")}} [1] | {{CompatNo}} | 16.0 | {{CompatNo}} |
[1] The Chromium project plans to drop supports for the internalSubset
, entities
and notations
methods.
[2] Firefox 25 also added the previousElementSibling
and nextElementSibling properties
, this was removed in Firefox 28 due to compatibility problems.