Code view functions
415
Returns
A pair of integers that represent offsets from the beginning of the source document. The first
integer is the opening of the selection; the second is the closing of the selection. If the two
numbers are equal, the selection is an insertion point. If there is no selection in the source, both
numbers are -1.
dom.source.getLineFromOffset()
Availability
Dreamweaver MX.
Description
Takes an offset into the source document.
Arguments
None.
Returns
The associated line number, or -1 if the offset is negative or past the end of the file.
dom.source.getText()
Availability
Dreamweaver 4.
Description
Returns the text string in the source between the designated offsets.
Arguments
startOffset
,
endOffset
•
The
startOffset
argument is an integer that represents the offset from the beginning of
the document.
•
The
endOffset
argument is an integer that represents the end of the document.
Returns
A string that represents the text in the source code between the offsets
start
and
end
.
dom.source.getValidationErrorsForOffset()
Availability
Dreamweaver MX 2004.
Description
Returns a list of validation errors at the specified offset, or it searches from the offset for the next
error. If none are found the function, it returns
null
.
000_DW_API_Print.book Page 415 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...