generate data argument in javascript for blocks taking arguments