[Webkit-unassigned] [Bug 6938] getSelection is broken from a "do javaScript" call
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Mon Jan 30 12:53:17 PST 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=6938
ap at nypop.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ap at nypop.com,
| |justin.garcia at apple.com
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Comment #1 from ap at nypop.com 2006-01-30 12:53 -------
I don't think this is expected to work. In Safari 1.2, window.getSelection()
incorrectly returned a string instead of a Selection object. So, the correct
code for Safari 1.3/2.0+ would be:
tell application "Safari" to do JavaScript "getSelection().toString()" in
document 1
Unfortunately, Selection:toString() used to have a bug which prevented this
from working (see bug 4609). To work around it, use:
tell application "Safari" to do JavaScript "getSelection() + \"\"" in document
1
Please see <http://developer.mozilla.org/en/docs/DOM:window.getSelection> for
the complete description of getSelection() and the Selection object.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list