Revert "Remove unnecessary passing of connection data."

This reverts commit 774dda8dc51d90e02b5c64645bc0b720da38bc8d.
Updated js file