Add javascript class support