send callback to js