DocumentType
The DocumentType
interface represents a Node
containing a doctype.
Properties
Inherits properties from its parent, Node
.
DocumentType.internalSubset
Read only-
A
DOMString
of the internal subset, ornull
if there is none. Eg"<!ELEMENT foo (bar)>"
. DocumentType.name
Read only-
A
DOMString
, eg"html"
for<!DOCTYPE HTML>
. DocumentType.notations
Read only-
A
NamedNodeMap
with notations declared in the DTD. DocumentType.publicId
Read only-
A
DOMString
, eg"-//W3C//DTD HTML 4.01//EN"
, empty string for HTML5. DocumentType.systemId
Read only-
A
DOMString
, eg"http://www.w3.org/TR/html4/strict.dtd"
, empty string for HTML5.
Methods
Inherits methods from its parent, Node
.
DocumentType.after()
-
Inserts a set of
Node
orDOMString
objects in the children list of theDocumentType
's parent, just after theDocumentType
object. DocumentType.before()
-
Inserts a set of
Node
orDOMString
objects in the children list of theDocumentType
's parent, just before theDocumentType
object. DocumentType.remove()
-
Removes the object from its parent children list.
DocumentType.replaceWith()
-
Replaces the document type with a set of given nodes.
Specifications
Specification |
---|
DOM Standard # interface-documenttype |
Browser compatibility
BCD tables only load in the browser