01 November, 2000

Appendix C: ECMA Script Language Binding

This appendix contains the complete ECMA Script [ECMAScript] binding for the Level 3 Document Object Model Content Model and Load and Save definitions.

Object
Object CMObject
Object CMExternalObject
Object CMNode
Object CMNodeList
Object NamedCMNodeMap
Object CMDataType
Object CMType
Object ElementDeclaration
The ElementDeclaration object has the following properties:
elementName
This read-only property is of type String.
contentType
This property is of type String.
attributes
This property is a NamedCMNodeMap object.
Object CMElement
The CMElement object has the following properties:
listOperator
This property is of type String.
elementType
This property is a CMDataType object.
multiplicity
This property is a int object.
lowValue
This property is a int object.
highValue
This property is a int object.
subModels
This property is a NamedCMNodeMap object.
definingElement
This property is a CMNodeList object.
Object AttributeDeclaration
The AttributeDeclaration object has the following properties:
attrName
This read-only property is of type String.
attrType
This property is a CMDataType object.
defaultValue
This property is of type String.
enumAttr
This property is of type String.
ownerElement
This property is a CMNodeList object.
Object EntityDeclaration
Object
Object DocumentCM
DocumentCM has the all the properties and methods of the Document object as well as the properties and methods defined below.
The DocumentCM object has the following methods:
isValid()
This method returns a Boolean.
numCMs()
This method returns a int object.
getInternalCM()
This method returns a CMObject object.
getCMs()
This method returns a CMExternalObject object.
getActiveCM()
This method returns a CMObject object.
addCM(cm)
This method has no return value.
The cm parameter is a CMObject object.
removeCM(cm)
This method has no return value.
The cm parameter is a CMObject object.
activateCM(cm)
This method returns a Boolean.
The cm parameter is a CMObject object.
setErrorHandler(handler)
This method has no return value.
The handler parameter is a ErrorHandler object.
Object DomImplementationCM
DomImplementationCM has the all the properties and methods of the DomImplementation object as well as the properties and methods defined below.
The DomImplementationCM object has the following methods:
validate()
This method returns a Boolean.
createCM()
This method returns a CMObject object.
createExternalCM()
This method returns a CMExternalObject object.
cloneCM(cm)
This method returns a CMObject object.
The cm parameter is a CMObject object.
cloneExternalCM(cm)
This method returns a CMExternalObject object.
The cm parameter is a CMExternalObject object.
Object ErrorHandler
The ErrorHandler object has the following methods:
warning(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMException2 object.
fatalError(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMException2 object.
error(where, how, why)
This method has no return value.
The where parameter is a DOMLocator object.
The how parameter is of type String.
The why parameter is of type String.
This method can raise a DOMException2 object.
Object DOMLocator
The DOMLocator object has the following methods:
getColumnNumber()
This method returns a int object.
getLineNumber()
This method returns a int object.
getPublicID()
This method returns a String.
getSystemID()
This method returns a String.
getNode()
This method returns a Node object.
Object
Object CMObject
The CMObject object has the following properties:
isNamespaceAware
This read-only property is of type Boolean.
The CMObject object has the following methods:
getCMNamespace()
This method returns a nsElement object.
getCMElements()
This method returns a namedCMNodeMap object.
removeCMNode(node)
This method returns a Boolean.
The node parameter is a CMNode object.
insertbeforeCMNode(newnode, parentnode)
This method returns a Boolean.
The newnode parameter is a CMNode object.
The parentnode parameter is a CMNode object.
Object CMNode
The CMNode object has the following methods:
getCMNodeType()
This method returns a CMType object.
Object ElementDeclaration
The ElementDeclaration object has the following methods:
getContentType()
This method returns a int object.
getCMElement()
This method returns a CMElement object.
getCMAttributes()
This method returns a namedCMNodeMap object.
getCMElementsChildren()
This method returns a namedCMNodeMap object.
Object CMElement
The CMElement object has the following methods:
setCMElementCardinality(node, high, low)
This method returns a CMElement object.
The node parameter is a CMNode object.
The high parameter is a int object.
The low parameter is a int object.
getCMElementCardinality(node, high, low)
This method returns a CMElement object.
The node parameter is a CMNode object.
The high parameter is a int object.
The low parameter is a int object.
Object
Object NodeCM
NodeCM has the all the properties and methods of the Node object as well as the properties and methods defined below.
The NodeCM object has the following methods:
canInsertBefore(newChild, refChild)
This method returns a Boolean.
The newChild parameter is a Node object.
The refChild parameter is a Node object.
This method can raise a DOMException object.
canRemoveChild(oldChild)
This method returns a Boolean.
The oldChild parameter is a Node object.
This method can raise a DOMException object.
canReplaceChild(newChild, oldChild)
This method returns a Boolean.
The newChild parameter is a Node object.
The oldChild parameter is a Node object.
This method can raise a DOMException object.
canAppendChild(newChild)
This method returns a Boolean.
The newChild parameter is a Node object.
This method can raise a DOMException object.
Object ElementCM
ElementCM has the all the properties and methods of the Element object as well as the properties and methods defined below.
The ElementCM object has the following methods:
isValid()
This method returns a Boolean.
contentType()
This method returns a int object.
canSetAttribute(attrname, attrval)
This method returns a Boolean.
The attrname parameter is of type String.
The attrval parameter is of type String.
canSetAttributeNode(node)
This method returns a Boolean.
The node parameter is a Node object.
canSetAttributeNodeNS(node, namespaceURI, localName)
This method returns a Boolean.
The node parameter is a Node object.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
canSetAttributeNS(attrname, attrval, namespaceURI, localName)
This method returns a Boolean.
The attrname parameter is of type String.
The attrval parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
Object CharacterDataCM
CharacterDataCM has the all the properties and methods of the Text object as well as the properties and methods defined below.
The CharacterDataCM object has the following methods:
isWhitespaceOnly()
This method returns a Boolean.
canSetData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canAppendData(arg)
This method returns a Boolean.
The arg parameter is of type String.
This method can raise a DOMException object.
canReplaceData(offset, count, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The count parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canInsertData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
canDeleteData(offset, arg)
This method returns a Boolean.
The offset parameter is of type Number.
The arg parameter is of type String.
This method can raise a DOMException object.
Object DocumentTypeCM
DocumentTypeCM has the all the properties and methods of the DocumentType object as well as the properties and methods defined below.
The DocumentTypeCM object has the following methods:
isElementDefined(elemTypeName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
isElementDefinedNS(elemTypeName, namespaceURI, localName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
isAttributeDefined(elemTypeName, attrName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The attrName parameter is of type String.
isAttributeDefinedNS(elemTypeName, attrName, namespaceURI, localName)
This method returns a Boolean.
The elemTypeName parameter is of type String.
The attrName parameter is of type String.
The namespaceURI parameter is of type String.
The localName parameter is of type String.
isEntityDefined(entName)
This method returns a Boolean.
The entName parameter is of type String.
Object DOMImplementationLS
The DOMImplementationLS object has the following methods:
createDOMBuilder()
This method returns a DOMBuilder object.
createDOMWriter()
This method returns a DOMWriter object.
Object DOMBuilder
The DOMBuilder object has the following properties:
entityResolver
This property is a DOMEntityResolver object.
errorHandler
This property is a DOMErrorHandler object.
filter
This property is a DOMBuilderFilter object.
The DOMBuilder object has the following methods:
setFeature(name, state)
This method has no return value.
The name parameter is of type String.
The state parameter is of type Boolean.
This method can raise a DOMException object.
supportsFeature(name)
This method returns a Boolean.
The name parameter is of type String.
canSetFeature(name, state)
This method returns a Boolean.
The name parameter is of type String.
The state parameter is of type Boolean.
getFeature(name)
This method returns a Boolean.
The name parameter is of type String.
This method can raise a DOMException object.
parseURI(uri)
This method returns a Document object.
The uri parameter is of type String.
This method can raise a DOMException object or a DOMSystemException object.
parseDOMInputSource(is)
This method returns a Document object.
The is parameter is a DOMInputSource object.
This method can raise a DOMException object or a DOMSystemException object.
Object DOMInputSource
The DOMInputSource object has the following properties:
byteStream
This property is a DOMInputStream object.
characterStream
This property is a DOMReader object.
encoding
This property is a DOMString object.
publicId
This property is a DOMString object.
systemId
This property is a DOMString object.
Object DOMEntityResolver
The DOMEntityResolver object has the following methods:
resolveEntity(publicId, systemId )
This method returns a DOMInputSource object.
The publicId parameter is of type String.
The systemId parameter is of type String.
This method can raise a DOMSystemException object.
Object DOMBuilderFilter
The DOMBuilderFilter object has the following methods:
endElement(element)
This method returns a Boolean.
The element parameter is a Element object.
Object DOMWriter
The DOMWriter object has the following properties:
formatter
This property is a DOMFormatter object.
The DOMWriter object has the following methods:
writeNode(destination, node)
This method has no return value.
The destination parameter is a DOMOutputStream object.
The node parameter is a Node object.
This method can raise a DOMSystemException object.
writeTreeWalker(destination, tree)
This method has no return value.
The destination parameter is a DOMOutputStream object.
The tree parameter is a TreeWalker object.
This method can raise a DOMSystemException object.
writeString(destination, aString)
This method has no return value.
The destination parameter is a DOMOutputStream object.
The aString parameter is of type String.
This method can raise a DOMSystemException object.
Object DOMFormatter
The DOMFormatter object has the following properties:
encoding
This property is of type String.
lastEncoding
This read-only property is of type String.
substituteChars
This property is of type String.
format
This property is of type Number.
The DOMFormatter object has the following methods:
formatNode(rootNode, destination)
This method has no return value.
The rootNode parameter is a Node object.
The destination parameter is a DOMOutputStream object.
This method can raise a DOMSystemException object.
formatTreeWalker(tree, destination)
This method has no return value.
The tree parameter is a TreeWalker object.
The destination parameter is a DOMOutputStream object.
This method can raise a DOMSystemException object.