¡@

Home 

javascript Programming Glossary: win.getselection

How to get all elements that are highlighted

http://stackoverflow.com/questions/1482832/how-to-get-all-elements-that-are-highlighted

win var range sel elmlist treeWalker containerElement sel win.getSelection if sel.rangeCount 0 range sel.getRangeAt 0 if range containerElement..

Get a range's start and end offset's relative to its parent container

http://stackoverflow.com/questions/4811822/get-a-ranges-start-and-end-offsets-relative-to-its-parent-container

var win doc.defaultView doc.parentWindow var sel if typeof win.getSelection undefined var range win.getSelection .getRangeAt 0 var preCaretRange.. var sel if typeof win.getSelection undefined var range win.getSelection .getRangeAt 0 var preCaretRange range.cloneRange preCaretRange.selectNodeContents..

Editing Iframe Content in IE - problem in maintaining text selection

http://stackoverflow.com/questions/5767037/editing-iframe-content-in-ie-problem-in-maintaining-text-selection

IE 9 and non IE saveSelection function win var sel win.getSelection ranges if sel.rangeCount for var i 0 len sel.rangeCount i len.. restoreSelection function win savedSelection var sel win.getSelection sel.removeAllRanges for var i 0 len savedSelection.length i..

determine the frame id/name when a user has selected text in that frame- the page has multiple frames

http://stackoverflow.com/questions/7807510/determine-the-frame-id-name-when-a-user-has-selected-text-in-that-frame-the-pag

iframe is ignored. function getSelectedText win var sel if win.getSelection return win.getSelection else if sel win.document.selection if.. getSelectedText win var sel if win.getSelection return win.getSelection else if sel win.document.selection if sel.type Text return..

designMode iFrame Get Cursor Position

http://stackoverflow.com/questions/8664504/designmode-iframe-get-cursor-position

var sel range preCaretRange caretOffset 0 if typeof win.getSelection undefined sel win.getSelection if sel.rangeCount range sel.getRangeAt.. caretOffset 0 if typeof win.getSelection undefined sel win.getSelection if sel.rangeCount range sel.getRangeAt 0 preCaretRange range.cloneRange..