[All Packages]  [This Package]  [Previous Class]  [Next Class]

Class: DOMImplementation

This class contains methods relating to the specific DOM implementation supported by the parser.


Method Index

createDocument Create and return a DOCUMENT node
createDocumentType Create and return a DOCUMENT_TYPE (DTD) node
hasFeature Detect if the named feature is supported

Methods

createDocument

Function:
Creates and returns a DOCUMENT node. When doctype is not null, its Node.ownerDocument attribute is set to the document being created.

Prototype:
Document *createDocument(DOMString uri, DOMString qname, DocumentType *dtd)

Arguments:
uri -- namespace URI of the new document element
qname -- qualified name of the new document element
dtd -- document type (DTD)

Returns:
Document* -- pointer to created Document node

createDocumentType

Function:
Creates and returns a DOCUMENT_TYPE (DTD) node.

Prototype:
DocumentType *createDocumentType(DOMString qname, DOMString pubid, DOMString sysid)

Arguments:
qname -- qualified name of the new document type
pubid -- external subset public identifier
sysid -- external subset system identifier

Returns:
DocumentType* -- pointer to created DOCUMENT_TYPE (DTD) node

hasFeature

Function:
Test if the DOM implementation implements a specific feature.

Prototype:
boolean hasFeature(DOMString feature, DOMString version)

Arguments:
feature -- The package name of the feature to test. In Level 1, the legal values are "HTML" and "XML" (case-insensitive)
version -- This is the version number of the package name to test. In Level 1, this is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return true.

Returns:
boolean -- feature is supported