getSelection() returns a string instead of Selection object
    Nick Swerdlow 
    NSwerdlow at Nextance.com
       
    Fri Jun  4 18:16:50 BST 2004
    
    
  
Hello all,
 
I am trying to create a DOM Range object based off a user's selection. 
In Mozilla I can easily do this using:
window.getSelection().getRangeAt(0) 
In IE I can do document.selection.createRange(); 
However, in Konqueror(3.2.2) document.getSelection() returns a string
instead of a Selection object and window.getSelection() doesn't work at
all. 
I know that the KHTML function KHTMLPart::selection() returns a
DOM::Range object 
(http://developer.kde.org/documentation/library/2.0-api/classref/khtml/K
HTMLPart.html#selection) 
The question is, is this function somehow exposed through JavaScript? 
If not, does anyone know of a workaround for the problem? 
Thanks in advance to anyone who can point me in the right direction. 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040604/6839b3d1/attachment.htm>
    
    
More information about the kfm-devel
mailing list