blueslip: Add some clarifying comments

(imported from commit 8b8ed83593d4dfb8ac3deb2c3442c2614481701a)
This commit is contained in:
Zev Benjamin 2013-03-12 19:15:14 -04:00
parent 09cf339c2b
commit 05eec2ae19
2 changed files with 8 additions and 1 deletions

View File

@ -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',

View File

@ -1,5 +1,4 @@
// Miscellaneous early setup.
// This is the first of our Javascript files to be included.
var templates = {};
var csrf_token;