add js callbacks