rl, true);
      xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
      xhr.setRequestHeader('X-CSRFToken', csrfToken);
      xhr.send(serializeParam(data));
    }

    var reportContext = {
      current_url: window.location.href
    };

    var reportData;
    try {
      reportData = JSON.stringify({'errorObj': error});
    } catch (err) {
      var stringifyError = {
        'message': error.message,
        'name': 'window.onerror stringify exception'
      };
      reportData