mod: implement native to js callback logic