[webkit-reviews] review requested: [Bug 7012] Coerce javascript objects to appleScript compatible types prior to returning them to applescript : [Attachment 6223] proposed patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Fri Feb 3 11:51:58 PST 2006


Alexey Proskuryakov <ap at nypop.com> has asked  for review:
Bug 7012: Coerce javascript objects to appleScript compatible types prior to
returning them to applescript
http://bugzilla.opendarwin.org/show_bug.cgi?id=7012

Attachment 6223: proposed patch
http://bugzilla.opendarwin.org/attachment.cgi?id=6223&action=edit

------- Additional Comments from Alexey Proskuryakov <ap at nypop.com>
This adds conversion for Boolean, String, Number and Date, and implicitly calls
toString() for unknown object types.

I am not sure if Array can really be converted to an AppleScript list
reliably... JavaScript arrays can be sparse, associated, or even contain
circular references (if I'm not mistaken) - so, I don't see any straightforward
(as in "no surprises for the user") way to convert them, other than toString().



More information about the webkit-reviews mailing list