[Webkit-unassigned] [Bug 7012] New: Coerce javascript objects to appleScript compatible types prior to returning them to applescript

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Wed Feb 1 14:23:20 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7012

           Summary: Coerce javascript objects to appleScript compatible
                    types prior to returning them to applescript
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: timothy.c.bates at gmail.com


The "do javaScript" AppleScript command for Safari currently fails to return
anything that is not a string.

As access to the  Safari DOM via AppleScript is entirely restricted to calls to
"do javaScript', it would be a helpful convenience to enhance  this call by
automatically coercing any non-string results to string, so that the user does
not have to do this manually.

i.e., allow do javaScript " document.getSelection; " to return the selection as
a string, rather than requiring the current workaround of

do javaScript " document.getSelection + '' ; "

In the case of javaScript lists, these should be coerced to applescript lists,
same for records would be nice.


-- 
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