diff --git a/zephyr/static/js/blueslip.js b/zephyr/static/js/blueslip.js index f58c20d0f4..3828c3f8a9 100644 --- a/zephyr/static/js/blueslip.js +++ b/zephyr/static/js/blueslip.js @@ -1,3 +1,7 @@ +// This must be included before the first call to $(document).ready +// in order to be able to report exceptions that occur during their +// execution. + // Silence jslint errors about the "console" global /*global console: true */ @@ -18,6 +22,10 @@ function report_error(msg, stack, opts) { return; } + // TODO: If an exception gets thrown before we setup ajax calls + // to include the CSRF token, our ajax call will fail. The + // elegant thing to do in that case is to either wait until that + // setup is done or do it ourselves and then retry. $.ajax({ type: 'POST', url: '/json/report_error', diff --git a/zephyr/static/js/setup.js b/zephyr/static/js/setup.js index c2d9bfcf5b..1762ed6b30 100644 --- a/zephyr/static/js/setup.js +++ b/zephyr/static/js/setup.js @@ -1,5 +1,4 @@ // Miscellaneous early setup. -// This is the first of our Javascript files to be included. var templates = {}; var csrf_token;