{"title":"GAJavaScript","html_url":"https://deallocatedobjects.com/posts/gajavascript","source_url":"https://github.com/newyankeecodeshop/GAJavaScript","markdown_content":"Been wanting something like this for a long time. [`GAJavaScript`](https://github.com/newyankeecodeshop/GAJavaScript) is a Cocoa Touch library that makes working with JavaScript from inside native code much more tolerable, maybe even fun.\r\n\r\n> JavaScript is accessed from Cocoa Touch using UIWebView. GAJavaScript has the concept of a \"script engine\", which provides the primary interface to the JavaScript runtime inside the UIWebView. Essentially, the UIWebView is an implementation detail of this library, but you may want to manage the UIWebView instance used by the script engine.\r\n\r\nSome might say it's a nasty hack, but in certain situations I can see this totally coming in handy. I work on a product regularly that needs to facilitate complex communication between remote web view content and local native code, and boy, I really wish I'd known about this library back when I started that project.\r\n\r\n[`GAJavaScript`](https://github.com/newyankeecodeshop/GAJavaScript) was built by [Andrew Goodale](http://twitter.com/andrewg95) and if you like it you should definitely take a look at one of his other projects, [`GAViewStyling`](https://github.com/newyankeecodeshop/GAViewStyling) which is a neat little library letting you style `UIView` objects with `CSS` style declarations.","html_content":"<p>Been wanting something like this for a long time. <a href=\"https://github.com/newyankeecodeshop/GAJavaScript\"><code>GAJavaScript</code></a> is a Cocoa Touch library that makes working with JavaScript from inside native code much more tolerable, maybe even fun.</p>\n\n<blockquote>\n<p>JavaScript is accessed from Cocoa Touch using UIWebView. GAJavaScript has the concept of a “script engine”, which provides the primary interface to the JavaScript runtime inside the UIWebView. Essentially, the UIWebView is an implementation detail of this library, but you may want to manage the UIWebView instance used by the script engine.</p>\n</blockquote>\n\n<p>Some might say it’s a nasty hack, but in certain situations I can see this totally coming in handy. I work on a product regularly that needs to facilitate complex communication between remote web view content and local native code, and boy, I really wish I’d known about this library back when I started that project.</p>\n\n<p><a href=\"https://github.com/newyankeecodeshop/GAJavaScript\"><code>GAJavaScript</code></a> was built by <a href=\"http://twitter.com/andrewg95\">Andrew Goodale</a> and if you like it you should definitely take a look at one of his other projects, <a href=\"https://github.com/newyankeecodeshop/GAViewStyling\"><code>GAViewStyling</code></a> which is a neat little library letting you style <code>UIView</code> objects with <code>CSS</code> style declarations.</p>","created_at":"2013-11-16T05:10:25.649Z","updated_at":"2013-11-16T05:10:25.649Z"}