'Return a dictionary of session/site configuration/options to jsonify
and pass onto the js app.
Defaults to `config`, `user`, and the root url. Pass kwargs to update further.'

def _get_js_options(self, trans, root=None):

    root = (root or web.url_for('/'))
    js_options = {'root': root, 'user': self.user_serializer.serialize(trans.user, self.USER_BOOTSTRAP_KEYS, trans=trans), 'config': self._get_site_configuration(trans), 'params': dict(trans.request.params), 'session_csrf_token': trans.session_csrf_token}
    return js_options
