|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--Selection
Defined in util/selection.js
| Field Summary | |
Object |
doc
HTML document |
Object |
win
Document's parent window |
| Constructor Summary | |
Selection
(doc, win)
The Selection class deals with selection and selection ranges inside an HTML document |
|
| Method Summary | |
void
|
clear()
Clean up the selection |
void
|
collapse(<Boolean> start)
Collapse the document selection |
Object
|
getBookmark()
Return a bookmark to the current selection range |
Object
|
getParentByTagNames(<String> tags)
Traverses the document tree up searching for an element which tag is one of the listed tag names. |
Object
|
getRange()
Return the first range of the current selection, or create a new one |
Object
|
getSelectedElement()
Return the current selected element |
String
|
getSelectedHTML()
Retrieve the HTML contents of the current selection |
Object
|
getSelection()
Return the native selection object associated with the document |
String
|
getType()
Get the type of the current selection. |
void
|
restore()
Restore the selection from the cache |
void
|
save()
Save the selection in an internal cache |
void
|
selectElement(<Object> elm, collapse, start)
Set a new selection in the document, so that the passed element is between the start and end of the created selection range |
| Field Detail |
Object doc
Object win
| Constructor Detail |
Selection(doc, win)
HTML - Document
HTML - parent window (optional)
| Method Detail |
void clear()
void collapse(<Boolean> start)
start - Collapse to start (true,null) or to end (false)
Object getBookmark()
Object getParentByTagNames(<String> tags)
tags - Comma-separated list of tag names
Object getRange()
Object getSelectedElement()
String getSelectedHTML()
Object getSelection()
String getType()
void restore()
void save()
void selectElement(<Object> elm, collapse, start)
elm - Element
|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||