title: handsontable load data with ajax on site load
body: <p>can someone explain why this code works:</p>
  
  <pre><code>$(document).ready(function () {
  
  
      var container = document.getElementById('example');
  
  
      function getData() {
  
          var result = null;
          $.ajax({
              url: 'someurl',
              type: 'get',
              dataType: 'json',
              async: false,
              success: function(res) {
                  result = res.data;
              }
          });
  
          return result;
  
      }
  
      var hot = new Handsontable(container,{
          data:getData(),
          startRows: 8,
          startCols: 8,
          rowHeaders: true,
          colHeaders: true,
  
          stretchH: 'all',
          minSpareRows: 0,
          contextMenu: true
  
      });
  
  });
  </code></pre>
  
  <p>and if i change async to true it doesn´t work.</p>
  
  <p>The working code comes with this message in the console:</p>
  
  <p>Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.</p>
  
  <p>And the important question what I have to change that handsontable will work with async:true.</p>
  
  <p>Thanks a lot. I have searched google and only find examples with a load Button not with loading on site load.</p>