Ignore:
Timestamp:
03/22/07 17:42:20 (12 years ago)
Author:
ray
Message:

added functions to handle storing/restoring of selections: Xinha.prototype.saveSelection/Xinha.prototype.restoreSelection

/** 
 * Returns a range object to be stored 
 * and later restored with Xinha.prototype.restoreSelection()
 * 
 * @returns Range
 */
Xinha.prototype.saveSelection = function()

/** 
 * Restores a selection previously stored
 * @param savedSelection Range object as returned by Xinha.prototype.restoreSelection()
 */
Xinha.prototype.restoreSelection = function(savedSelection)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/InternetExplorer/InternetExplorer.js

    r771 r794  
    279279}; 
    280280 
     281/**  
     282 * Returns a range object to be stored  
     283 * and later restored with Xinha.prototype.restoreSelection() 
     284 *  
     285 * @returns Range 
     286 */ 
     287Xinha.prototype.saveSelection = function() 
     288{ 
     289  return this.createRange(this._getSelection()) 
     290} 
     291/**  
     292 * Restores a selection previously stored 
     293 * @param savedSelection Range object as returned by Xinha.prototype.restoreSelection() 
     294 */ 
     295Xinha.prototype.restoreSelection = function(savedSelection) 
     296{ 
     297  savedSelection.select(); 
     298} 
     299 
    281300/** 
    282301 * Selects the contents of the given node.  If the node is a "control" type element, (image, form input, table) 
Note: See TracChangeset for help on using the changeset viewer.