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/KHTMLPart.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