Retrieves a bookmark that can be used with moveToBookmark to return to the same range
Usage
function () (view source)
var bookmark, selection = dojo.doc.selection;
if(selection){// IEvar range = selection.createRange();
if(selection.type.toUpperCase()=='CONTROL'){if(range.length){
bookmark=[];
var i=0,len=range.length;
while(i<len){
bookmark.push(range.item(i++));
}}else{
bookmark=null;
}}else{
bookmark = range.getBookmark();
}}else{if(window.getSelection){
selection = dojo.global.getSelection();
if(selection){
range = selection.getRangeAt(0);
bookmark = range.cloneRange();
}}else{
console.warn("No idea how to store the current selection for this browser!");
}}return bookmark; // Array