W3cubDocs

/DOM

DocumentType

The DocumentType interface represents a Node containing a doctype.

Properties

Inherits properties from its parent, Node, and implements the ChildNode interface.

...
DocumentType.entities Read only
...
DocumentType.name Read only
...
DocumentType.notations Read only
...
DocumentType.publicId Read only
...
DocumentType.systemId Read only
...

Methods

Inherits methods from its parent, Node, and implements the ChildNode interface.

ChildNode.remove()
Removes the object from its parent children list.

Specifications

Specification Status Comment
DOM
The definition of 'DocumentType' in that specification.
Living Standard Added implemention of the ChildNode interface.
Removed the internalSubset, entities, and notation properties.
Document Object Model (DOM) Level 3 Core Specification
The definition of 'DocumentType' in that specification.
Recommendation No change from Document Object Model (DOM) Level 2 Core Specification.
Document Object Model (DOM) Level 2 Core Specification
The definition of 'CharacterData' in that specification.
Recommendation Added the publicID, systemID, and internalSubset properties.
Document Object Model (DOM) Level 1 Specification
The definition of 'CharacterData' in that specification.
Recommendation Initial definition

Browser Compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 (Yes) 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
entities and notations 1.0[1] (Yes) 1.0 (1.7 or earlier)
No support6.0 (6.0)
? (Yes)[1] (Yes)
Implements ChildNode 29.0 (Yes) 25.0 (25.0)[2] No support 16.0 No support
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
entities and notations (Yes)[1] (Yes) 1.0 (1.0)
No support6.0 (6.0)
? (Yes) (Yes)
Implements ChildNode (Yes) (Yes) 25.0 (25.0)[2] No support 16.0 No support

[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.

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DocumentType