DocumentType
The DocumentType
interface represents a Node
containing a doctype.
Instance properties
Inherits properties from its parent, Node
.
DocumentType.name
Read only-
A string, eg
"html"
for<!DOCTYPE HTML>
. DocumentType.publicId
Read only-
A string, eg
"-//W3C//DTD HTML 4.01//EN"
, now and empty string for HTML. DocumentType.systemId
Read only-
A string, eg
"http://www.w3.org/TR/html4/strict.dtd"
, now an empty string for HTML.
Instance methods
Inherits methods from its parent, Node
.
DocumentType.after()
-
Inserts a set of
Node
or string objects in the children list of theDocumentType
's parent, just after theDocumentType
object. DocumentType.before()
-
Inserts a set of
Node
or string 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