rem: var searchStr;    if ("getSelection" in this.target.ownerDocument) searchStr = this.target.ownerDocument.getSelection(); else searchStr = _content.getSelection();  
add: var focusedWindow = document.commandDispatcher.focusedWindow; var searchStr = focusedWindow.getSelection(); 
context:     searchSelected : function() {        var searchStr;        // workaround for bug 117805 to enable context menus in XML documents        // until bug 116523 is fixed.        if ("getSelection" in this.target.ownerDocument)            searchStr = this.target.ownerDocument.getSelection();        else            searchStr = _content.getSelection();        searchStr = searchStr.toString();        searchStr = searchStr.replace( /^\s+/, "" );        searchStr = searchStr.replace(/(\n|\r|\t)+/g, " ");        searchStr = searchStr.replace(/\s+$/,"");        return searchStr;    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0d3d4b94b0ba6ec26f4be6102f255bb5ecbdfcbb/nsContextMenu.js/buggy/xpfe/communicator/resources/content/nsContextMenu.js