{"json_modified": "2016-04-29T10:03:06.639367", "uuid": "a8f16afc-23ee-4b1e-a453-cde0e4359343", "title": "Declaring and Using Callbacks", "url": "/en-US/docs/Mozilla/js-ctypes/Using_js-ctypes/Declaring_and_Using_Callbacks", "tags": ["js-ctypes", "Guide", "JavaScript"], "translations": [], "modified": "2016-04-29T10:03:06", "label": "Declaring and Using Callbacks", "localization_tags": [], "locale": "en-US", "id": 3353, "last_edit": "2016-04-29T10:03:04", "summary": "C functions occasionally take function pointers as arguments, which are generally used as callbacks. In these cases, js-ctypes allows you to pass a regular JavaScript function as the callback. This is very powerful, since it allows native code to transparently call into JavaScript.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Prerequiste_Understanding", "title": "Prerequiste Understanding"}, {"id": "Declaring_Callbacks", "title": "Declaring Callbacks"}, {"id": "Examples", "title": "Examples"}, {"id": "Example_1", "title": "Example 1"}, {"id": "Example_2", "title": "Example 2"}, {"id": "Using_Callbacks", "title": "Using Callbacks"}, {"id": "Arguments_and_return_values", "title": "Arguments and return values"}], "slug": "Mozilla/js-ctypes/Using_js-ctypes/Declaring_and_Using_Callbacks", "review_tags": []}