API generator: JS callback support