01 September, 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 definitions.

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 property is of type String.
contentType
This property is of type String.
attributes
This property is of type NamedCMNodeMap.
Object ElementCMModel
The ElementCMModel object has the following properties:
listOperator
This property is of type String.
multiplicity
This property is of type int.
lowValue
This property is of type int.
highValue
This property is of type int.
subModels
This property is of type NamedCMNodeMap.
definingElement
This property is of type CMNodeList.
Object AttributeDeclaration
The AttributeDeclaration object has the following properties:
attrName
This property is of type String.
attrType
This property is of type CMDataType.
defaultValue
This property is of type String.
enumAttr
This property is of type String.
ownerElement
This property is of type CMNodeList.
Object EntityDeclaration
Object DocumentCM
DocumentCM has the all the properties and methods of Document 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.
getInternalCM()
This method returns a CMObject.
getCMs()
This method returns a CMExternalObject *.
getActiveCM()
This method returns a CMObject.
addCM(cm)
This method has no return value.
The cm parameter is of type CMObject.
removeCM(cm)
This method has no return value.
The cm parameter is of type CMObject.
activateCM(cm)
This method returns a boolean.
The cm parameter is of type CMObject.
Object DomImplementationCM
DomImplementationCM has the all the properties and methods of DomImplementation 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.
createExternalCM()
This method returns a CMExternalObject.
cloneCM(cm)
This method returns a CMObject.
The cm parameter is of type CMObject.
cloneExternalCM(cm)
This method returns a CMExternalObject.
The cm parameter is of type CMExternalObject.
Object ErrorHandler
The ErrorHandler object has the following methods:
warning(DOMString, DOMString, DOMString)
This method has no return value.
The DOMString parameter is of type where.
The DOMString parameter is of type how.
The DOMString parameter is of type why.
fatalError(DOMString, DOMString, DOMString)
This method has no return value.
The DOMString parameter is of type where.
The DOMString parameter is of type how.
The DOMString parameter is of type why.
error(DOMString, DOMString, DOMString)
This method has no return value.
The DOMString parameter is of type where.
The DOMString parameter is of type how.
The DOMString parameter is of type why.
Object CMObject
The CMObject object has the following properties:
isNamespaceAware
This property is of type boolean.
The CMObject object has the following methods:
getCMNamespace()
This method returns a nsElement.
getCMElements()
This method returns a namedCMNodeMap.
removeCMNode(node)
This method returns a boolean.
The node parameter is of type CMNode.
insertbeforeCMNode(newnode, parentnode)
This method returns a boolean.
The newnode parameter is of type CMNode.
The parentnode parameter is of type CMNode.
Object CMNode
The CMNode object has the following methods:
getCMNodeType()
This method returns a CMType.
Object ElementDeclaration
The ElementDeclaration object has the following methods:
getContentType()
This method returns a int.
getCMElement()
This method returns a ElementCMModel.
getCMAttributes()
This method returns a namedCMNodeMap.
getCMElementsChildren()
This method returns a namedCMNodeMap.
Object ElementCMModel
The ElementCMModel object has the following methods:
setCMElementCardinality(node, high, low)
This method returns a ElementCMModel.
The node parameter is of type CMNode.
The high parameter is of type int.
The low parameter is of type int.
getCMElementCardinality(node, high, low)
This method returns a ElementCMModel.
The node parameter is of type CMNode.
The high parameter is of type int.
The low parameter is of type int.
Object NodeCM
NodeCM has the all the properties and methods of Node as well as the properties and methods defined below.
The NodeCM object has the following methods:
canInsertBefore()
This method returns a boolean.
canRemoveChild()
This method returns a boolean.
canReplaceChild()
This method returns a boolean.
canAppendChild()
This method returns a boolean.
Object ElementCMModel
The ElementCMModel object has the following methods:
isValid()
This method returns a boolean.
contentType()
This method returns a int.
canSetAttribute(attrname, attrval)
This method returns a boolean.
The attrname parameter is of type String.
The attrval parameter is of type String.
canSetAttributeNode()
This method returns a boolean.
Object TextCM
TextCM has the all the properties and methods of Text as well as the properties and methods defined below.
The TextCM object has the following methods:
isWhitespaceOnly()
This method returns a boolean.
canSetData()
This method returns a boolean.
canAppendData()
This method returns a boolean.
canReplaceData()
This method returns a boolean.
canInsertData()
This method returns a boolean.
Object DocumentCM
DocumentCM has the all the properties and methods of Document as well as the properties and methods defined below.
The DocumentCM object has the following methods:
isElementDefined(elemTypeName)
This method returns a boolean.
The elemTypeName 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.
isEntityDefined(entName)
This method returns a boolean.
The entName parameter is of type String.