Implementation of native JavaScript object methods in Objective-C