Add support for connection notifications to JavaScript