[Webkit-unassigned] [Bug 31759] [GTK] WebKitWebView needs API to scroll to selection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 11 13:52:20 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=31759





--- Comment #17 from Peter Bloomfield <pbloomfield at bellsouth.net>  2010-01-11 13:52:19 PST ---
(In reply to comment #16)
> If the information you want it accessible via the window object in JavaScript,
> you could possibly use the JavaScriptCore API to accomplish the same thing. You
> might look at how Epiphany currently handles saving form data for an example.

Thanks for the hint!  JSEvaluateScript does the trick: as Eric pointed out,
window.getSelection().getRangeAt(0).getBoundingClientRect() gets the
rectangle--I just didn't know that I could call it!  Similarly,
window.getSelection().removeAllRanges() clears the selection.

So my immediate need is met.  It's not the most transparent API, however...

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list