Added support for adding callbacks from the browser