15 November 2000

Appendix C: ECMA Script Language Binding

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

Object View
The View object has the following methods:
select(boundary, offset, extend, add)
This method has no return value.
The boundary parameter is a Node object.
The offset parameter is of type Number.
The extend parameter is of type Boolean.
The add parameter is of type Boolean.
createSegment()
This method returns a Segment object.
matchFirstSegment(todo)
This method returns a Boolean.
The todo parameter is a Segment object.
This method can raise a DOMException object.
getIntegerProperty(name)
This method returns a long object.
The name parameter is of type String.
This method can raise a DOMException object.
getStringProperty(name)
This method returns a String.
The name parameter is of type String.
This method can raise a DOMException object.
getBooleanProperty(name)
This method returns a Boolean.
The name parameter is of type Boolean.
This method can raise a DOMException object.
getContentPropertyNode(name)
This method returns a Node object.
The name parameter is of type String.
This method can raise a DOMException object.
getContentPropertyOffset(name)
This method returns a Number.
The name parameter is of type String.
This method can raise a DOMException object.
Object Segment
Segment has the all the properties and methods of the Match object as well as the properties and methods defined below.
The Segment object has the following properties:
criteria
This property is a Match object.
order
This property is of type String.
The Segment object has the following methods:
addItem(add)
This method has no return value.
The add parameter is a Item object.
createMatchString(test, name, value)
This method returns a MatchString object.
The test parameter is of type Number.
The name parameter is of type String.
The value parameter is of type String.
createMatchInteger(test, name, value)
This method returns a MatchInteger object.
The test parameter is of type Number.
The name parameter is of type String.
The value parameter is a long object.
createMatchBoolean(test, name, value)
This method returns a MatchBoolean object.
The test parameter is of type Number.
The name parameter is of type String.
The value parameter is of type Boolean.
createMatchContent(test, name, offset, node)
This method returns a MatchContent object.
The test parameter is of type Number.
The name parameter is of type String.
The offset parameter is of type Number.
The node parameter is a Node object.
createMatchSet(test)
This method returns a MatchSet object.
The test parameter is of type Number.
createStringItem(name)
This method returns a StringItem object.
The name parameter is of type String.
createIntegerItem(name)
This method returns a IntegerItem object.
The name parameter is of type String.
createBooleanItem(name)
This method returns a BooleanItem object.
The name parameter is of type String.
createContentItem(name)
This method returns a ContentItem object.
The name parameter is of type String.
getItem(index)
This method has no return value.
The index parameter is of type Number.
getNext()
This method returns a Boolean.
Prototype Object Match
The Match class has the following constants:
Match.IS_EQUAL
This constant is of type Number and its value is 0.
Match.IS_NOT_EQUAL
This constant is of type Number and its value is 1.
Match.INT_PRECEDES
This constant is of type Number and its value is 2.
Match.INT_PRECEDES_OR_EQUALS
This constant is of type Number and its value is 3.
Match.INT_FOLLOWS
This constant is of type Number and its value is 4.
Match.INT_FOLLOWS_OR_EQUALS
This constant is of type Number and its value is 5.
Match.STR_STARTS_WITH
This constant is of type Number and its value is 6.
Match.STR_ENDS_WITH
This constant is of type Number and its value is 7.
Match.STR_CONTAINS
This constant is of type Number and its value is 8.
Match.SET_ANY
This constant is of type Number and its value is 9.
Match.SET_ALL
This constant is of type Number and its value is 10.
Match.SET_NOT_ANY
This constant is of type Number and its value is 11.
Match.SET_NOT_ALL
This constant is of type Number and its value is 12.
Object Match
The Match object has the following properties:
test
This read-only property is of type Number.
Object MatchString
MatchString has the all the properties and methods of the Match object as well as the properties and methods defined below.
The MatchString object has the following properties:
name
This read-only property is of type String.
value
This read-only property is of type String.
Object MatchInteger
MatchInteger has the all the properties and methods of the Match object as well as the properties and methods defined below.
The MatchInteger object has the following properties:
name
This read-only property is of type String.
value
This read-only property is a long object.
Object MatchBoolean
MatchBoolean has the all the properties and methods of the Match object as well as the properties and methods defined below.
The MatchBoolean object has the following properties:
name
This read-only property is of type String.
value
This read-only property is of type Boolean.
Object MatchContent
MatchContent has the all the properties and methods of the Match object as well as the properties and methods defined below.
The MatchContent object has the following properties:
name
This read-only property is of type String.
node
This read-only property is a Node object.
offset
This read-only property is of type Number.
Object MatchSet
MatchSet has the all the properties and methods of the Match object as well as the properties and methods defined below.
The MatchSet object has the following properties:
node
This read-only property is a Node object.
The MatchSet object has the following methods:
addMatch(add)
This method has no return value.
The add parameter is a Match object.
getMatch(index)
This method returns a Match object.
The index parameter is of type Number.
Object Item
The Item object has the following properties:
exists
This read-only property is of type Boolean.
name
This read-only property is of type String.
Object StringItem
StringItem has the all the properties and methods of the Item object as well as the properties and methods defined below.
The StringItem object has the following properties:
value
This read-only property is of type String.
Object IntegerItem
IntegerItem has the all the properties and methods of the Item object as well as the properties and methods defined below.
The IntegerItem object has the following properties:
value
This read-only property is a long object.
Object BooleanItem
BooleanItem has the all the properties and methods of the Item object as well as the properties and methods defined below.
The BooleanItem object has the following properties:
value
This property is of type Boolean.
Object ContentItem
ContentItem has the all the properties and methods of the Item object as well as the properties and methods defined below.
The ContentItem object has the following properties:
node
This property is a Node object.
offset
This property is of type Number.
Object VisualView
The VisualView object has the following properties:
fontScheme
This read-only property is of type String.
width
This read-only property is of type Number.
height
This read-only property is of type Number.
horizontalDPI
This read-only property is of type Number.
verticalDPI
This read-only property is of type Number.
The VisualView object has the following methods:
createVisualCharacter()
This method returns a VisualCharacter object.
createVisualCharacterRun()
This method returns a VisualCharacterRun object.
createVisualFrame()
This method returns a VisualFrame object.
createVisualImage()
This method returns a VisualImage object.
createVisualFormButton()
This method returns a VisualFormButton object.
createVisualFormField()
This method returns a VisualFormField object.
select(boundary, offset, extend, add)
This method has no return value.
The boundary parameter is a Node object.
The offset parameter is of type Number.
The extend parameter is of type Boolean.
The add parameter is of type Boolean.
matchSegment(segment)
This method has no return value.
The segment parameter is a VisualResource object.
Object VisualResource
Object VisualFont
VisualFont has the all the properties and methods of the VisualResource object as well as the properties and methods defined below.
The VisualFont object has the following properties:
matchFontName
This property is of type String.
exists
This read-only property is of type Boolean.
fontName
This read-only property is of type String.
The VisualFont object has the following methods:
getNext()
This method returns a Boolean.
Object VisualSegment
VisualSegment has the all the properties and methods of the VisualResource object as well as the properties and methods defined below.
The VisualSegment object has the following properties:
matchPosition
This property is of type Boolean.
matchInside
This property is of type Boolean.
matchContaining
This property is of type Boolean.
matchX
This property is a long object.
matchY
This property is a long object.
matchXR
This property is a long object.
matchYR
This property is a long object.
matchContent
This property is of type Boolean.
matchRange
This property is of type Boolean.
matchNode
This property is a Node object.
matchOffset
This property is of type Number.
matchNodeR
This property is a Node object.
matchOffsetR
This property is of type Number.
matchContainsSelected
This property is of type Boolean.
matchContainsVisible
This property is of type Boolean.
exists
This read-only property is of type Boolean.
startNode
This read-only property is a Node object.
startOffset
This read-only property is of type Number.
endNode
This read-only property is a Node object.
endOffset
This read-only property is of type Number.
topOffset
This read-only property is a long object.
bottomOffset
This read-only property is a long object.
leftOffset
This read-only property is a long object.
rightOffset
This read-only property is a long object.
width
This read-only property is of type Number.
height
This read-only property is of type Number.
selected
This read-only property is of type Boolean.
visible
This read-only property is of type Boolean.
foregroundColor
This read-only property is of type Number.
backgroundColor
This read-only property is of type Number.
fontName
This read-only property is of type String.
fontHeight
This read-only property is of type String.
The VisualSegment object has the following methods:
getNext()
This method returns a Boolean.
Object VisualCharacter
VisualCharacter has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
Object VisualCharacterRun
VisualCharacterRun has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
Object VisualFrame
VisualFrame has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
The VisualFrame object has the following properties:
embedded
This read-only property is a VisualSegment object.
Object VisualImage
VisualImage has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
The VisualImage object has the following properties:
imageURL
This read-only property is of type String.
isLoaded
This read-only property is of type Boolean.
Object VisualFormButton
VisualFormButton has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
The VisualFormButton object has the following properties:
isPressed
This read-only property is of type Boolean.
Object VisualFormField
VisualFormField has the all the properties and methods of the VisualSegment object as well as the properties and methods defined below.
The VisualFormField object has the following properties:
formValue
This read-only property is of type String.