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