Passing data to js