05 February 2003

Appendix C: ECMAScript Language Binding

This appendix contains the complete ECMAScript [ECMAScript] binding for the Level 3 Document Object Model Validation definitions.

Properties of the ExceptionVAL Constructor function:
ExceptionVAL.NO_GRAMMAR_AVAILABLE_ERR
The value of the constant ExceptionVAL.NO_GRAMMAR_AVAILABLE_ERR is 71.
Objects that implement the ExceptionVAL interface:
Properties of objects that implement the ExceptionVAL interface:
code
This property is a Number.
Objects that implement the DocumentEditVAL interface:
Objects that implement the DocumentEditVAL interface have all properties and functions of the NodeEditVAL interface as well as the properties and functions defined below.
Properties of objects that implement the DocumentEditVAL interface:
continuousValidityChecking
This property is a Boolean.
Functions of objects that implement the DocumentEditVAL interface:
getDefinedElementTypes(namespaceURI)
This function returns an object that implements the NameList interface.
The namespaceURI parameter is a String.
validateDocument()
This function has no return value.
This function can raise an object that implements the ExceptionVAL interface.
Properties of the NodeEditVAL Constructor function:
NodeEditVAL.WF_CHECK
The value of the constant NodeEditVAL.WF_CHECK is 1.
NodeEditVAL.NS_WF_CHECK
The value of the constant NodeEditVAL.NS_WF_CHECK is 2.
NodeEditVAL.PARTIAL_VALIDITY_CHECK
The value of the constant NodeEditVAL.PARTIAL_VALIDITY_CHECK is 3.
NodeEditVAL.STRICT_VALIDITY_CHECK
The value of the constant NodeEditVAL.STRICT_VALIDITY_CHECK is 4.
Objects that implement the NodeEditVAL interface:
Properties of objects that implement the NodeEditVAL interface:
defaultValue
This read-only property is a String.
enumeratedValues
This read-only property is an object that implements the DOMStringList interface.
Functions of objects that implement the NodeEditVAL interface:
canInsertBefore(newChild, refChild)
This function returns a Boolean.
The newChild parameter is an object that implements the Node interface.
The refChild parameter is an object that implements the Node interface.
canRemoveChild(oldChild)
This function returns a Boolean.
The oldChild parameter is an object that implements the Node interface.
canReplaceChild(newChild, oldChild)
This function returns a Boolean.
The newChild parameter is an object that implements the Node interface.
The oldChild parameter is an object that implements the Node interface.
canAppendChild(newChild)
This function returns a Boolean.
The newChild parameter is an object that implements the Node interface.
isNodeValid(deep, wFValidityCheckLevel)
This function returns a Boolean.
The deep parameter is a Boolean.
The wFValidityCheckLevel parameter is a Number.
This function can raise an object that implements the ExceptionVAL interface.
Objects that implement the ElementEditVAL interface:
Objects that implement the ElementEditVAL interface have all properties and functions of the NodeEditVAL interface as well as the properties and functions defined below.
Properties of objects that implement the ElementEditVAL interface:
allowedChildren
This read-only property is an object that implements the NameList interface.
allowedParents
This read-only property is an object that implements the NameList interface.
allowedNextSiblings
This read-only property is an object that implements the NameList interface.
allowedPreviousSiblings
This read-only property is an object that implements the NameList interface.
allowedAttributes
This read-only property is an object that implements the NameList interface.
requiredAttributes
This read-only property is an object that implements the NameList interface.
Functions of objects that implement the ElementEditVAL interface:
contentType()
This function returns a Number.
canSetAttribute(attrname, attrval)
This function returns a Boolean.
The attrname parameter is a String.
The attrval parameter is a String.
canSetAttributeNode(attrNode)
This function returns a Boolean.
The attrNode parameter is an object that implements the Attr interface.
canSetAttributeNS(namespaceURI, qualifiedName, value)
This function returns a Boolean.
The namespaceURI parameter is a String.
The qualifiedName parameter is a String.
The value parameter is a String.
canRemoveAttribute(attrname)
This function returns a Boolean.
The attrname parameter is a String.
canRemoveAttributeNS(namespaceURI, localName)
This function returns a Boolean.
The namespaceURI parameter is a String.
The localName parameter is a String.
canRemoveAttributeNode(attrNode)
This function returns a Boolean.
The attrNode parameter is an object that implements the Node interface.
isElementDefined(name)
This function returns a Boolean.
The name parameter is a String.
isElementDefinedNS(namespaceURI, name)
This function returns a Boolean.
The namespaceURI parameter is a String.
The name parameter is a String.
Objects that implement the CharacterDataEditVAL interface:
Objects that implement the CharacterDataEditVAL interface have all properties and functions of the NodeEditVAL interface as well as the properties and functions defined below.
Properties of objects that implement the CharacterDataEditVAL interface:
isWhitespaceOnly
This read-only property is a Boolean.
Functions of objects that implement the CharacterDataEditVAL interface:
canSetData(arg)
This function returns a Boolean.
The arg parameter is a String.
canAppendData(arg)
This function returns a Boolean.
The arg parameter is a String.
canReplaceData(offset, count, arg)
This function returns a Boolean.
The offset parameter is a Number.
The count parameter is a Number.
The arg parameter is a String.
canInsertData(offset, arg)
This function returns a Boolean.
The offset parameter is a Number.
The arg parameter is a String.
canDeleteData(offset, count)
This function returns a Boolean.
The offset parameter is a Number.
The count parameter is a Number.
Objects that implement the RangeVAL interface:
Objects that implement the RangeVAL interface have all properties and functions of the Range interface as well as the properties and functions defined below.
Functions of objects that implement the RangeVAL interface:
canSurroundContents(node1, node2, b)
This function returns a Boolean.
The node1 parameter is an object that implements the Node interface.
The node2 parameter is an object that implements the Node interface.
The b parameter is an object that implements the Node interface.
getAlternativeElements(refChild)
This function returns an object that implements the NameList interface.
The refChild parameter is an object that implements the Node interface.