Re: CallJS sample
Re: CallJS sample
- Subject: Re: CallJS sample
- From: Felix Franz <email@hidden>
- Date: Sun, 19 May 2013 22:31:26 +0200
On 19.05.2013, at 22:06, Huibert Aalbers <email@hidden> wrote:
> Hi everyone,
>
> I have been taking a look at the Javascript bridge as a way to allow users to script my Mac app. I have downloaded the CallJS sample from Apple and everything seems simple enough. However, it looks like the "Run JavaScript" button doesn't work, as the sentence [theWebView stringByEvaluatingJavaScriptFromString:[[scriptText textStorage] string]] doesn't seem to return anything.
just tried the sample. Entering 3+4 results in 7. The "return 'Hello JavaScript!';"
is no valid Javascript. Calling a function:
(function() {return 'Hello JavaScript!';})()
works though. For JavaScript-scripting: take a look at http://jstalk.org .
Cheers,
felix
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >CallJS sample (From: Huibert Aalbers <email@hidden>) |