{"action":"closed","issue":{"url":"https://api.github.com/repos/wyozi/gmod-luajsbridge/issues/2","labels_url":"https://api.github.com/repos/wyozi/gmod-luajsbridge/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/wyozi/gmod-luajsbridge/issues/2/comments","events_url":"https://api.github.com/repos/wyozi/gmod-luajsbridge/issues/2/events","html_url":"https://github.com/wyozi/gmod-luajsbridge/issues/2","id":55751598,"number":2,"title":"Function pointers","user":{"login":"wyozi","id":4894573,"avatar_url":"https://avatars.githubusercontent.com/u/4894573?v=3","gravatar_id":"","url":"https://api.github.com/users/wyozi","html_url":"https://github.com/wyozi","followers_url":"https://api.github.com/users/wyozi/followers","following_url":"https://api.github.com/users/wyozi/following{/other_user}","gists_url":"https://api.github.com/users/wyozi/gists{/gist_id}","starred_url":"https://api.github.com/users/wyozi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyozi/subscriptions","organizations_url":"https://api.github.com/users/wyozi/orgs","repos_url":"https://api.github.com/users/wyozi/repos","events_url":"https://api.github.com/users/wyozi/events{/privacy}","received_events_url":"https://api.github.com/users/wyozi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wyozi/gmod-luajsbridge/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-28T12:42:01Z","updated_at":"2015-01-30T12:52:59Z","closed_at":"2015-01-30T12:52:59Z","body":"It should be possible to pass a Lua function as a parameter. ```luajsbridge.ToJS``` should convert a function into a string identifier and wrap it in some kind of a library call, that returns a Javascript function.\r\n\r\nWhen that Javascript function is called, it should call a luajsbridge.OnCallback function added with html:AddFunction, that maps the string id and arguments to the original Lua callback and calls it."}}