Question- forget about cocoascript on your webpage
What exactly does forget about cocoascript if you use Skpm? These are words from your skpm.io webpage 
There is a very import function that cocoascript has for events like button click or text view change called 

setCOSJSTargetFunction:function(sender) {
    userClickedOK = true
}];

How do I create click events like this on controls without setCOSJSTargetFunction?