{"action":"closed","issue":{"url":"https://api.github.com/repos/ericwlange/AndroidJSCore/issues/3","labels_url":"https://api.github.com/repos/ericwlange/AndroidJSCore/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ericwlange/AndroidJSCore/issues/3/comments","events_url":"https://api.github.com/repos/ericwlange/AndroidJSCore/issues/3/events","html_url":"https://github.com/ericwlange/AndroidJSCore/issues/3","id":119801073,"number":3,"title":"Add ability to call Java functions from JS","user":{"login":"akirmse","id":2266354,"avatar_url":"https://avatars.githubusercontent.com/u/2266354?v=3","gravatar_id":"","url":"https://api.github.com/users/akirmse","html_url":"https://github.com/akirmse","followers_url":"https://api.github.com/users/akirmse/followers","following_url":"https://api.github.com/users/akirmse/following{/other_user}","gists_url":"https://api.github.com/users/akirmse/gists{/gist_id}","starred_url":"https://api.github.com/users/akirmse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akirmse/subscriptions","organizations_url":"https://api.github.com/users/akirmse/orgs","repos_url":"https://api.github.com/users/akirmse/repos","events_url":"https://api.github.com/users/akirmse/events{/privacy}","received_events_url":"https://api.github.com/users/akirmse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-01T20:29:00Z","updated_at":"2015-12-02T01:13:19Z","closed_at":"2015-12-02T01:13:19Z","body":"In JavascriptCore on iOS, you can call your own functions from JS by implementing the JSExport protocol.  There is a similar ability in Rhino where you can directly call e.g. java.lang functions.  This would be extremely useful even for simple things like calling System.out for printing debugging strings.\r\n\r\nHere's an example (Swift on iOS):\r\nhttp://www.dbotha.com/2014/11/19/using-javascript-core-for-game-scripting-on-ios/"}}