Adding js api to core