handle return value from objective-c to javascript