Extend javascript support for object functions