finish the inherit of javascript class.