An example on how to bind a Javascript function

I’m searching for a self-explanatory example that shows how to bind a javascript callback. I need to call a javascript function starting from inside a native cocos2d function. Could someone help ?

Connecting to this question :slight_smile:

simon pan has written an excellent tutorial and also discussed the problem when using javascript binding generator at

steps for using jsb generator is at

it is in Chinese