Skip to content

Commit

Permalink
[WebProfilerBundle] Make toolbar loading non-blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jun 21, 2011
1 parent 6ab11eb commit 406c8d8
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -8,10 +8,14 @@
} else {
xhr = new ActiveXObject('Microsoft.XMLHTTP');
}
xhr.open('GET', '{{ path("_wdt", { "token": token }) }}', false);
xhr.open('GET', '{{ path("_wdt", { "token": token }) }}', true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onreadystatechange = function(state) {
if (4 === xhr.readyState && 200 === xhr.status) {
wdt.innerHTML = xhr.responseText;
wdt.style.display = 'block';
}
};
xhr.send('');
wdt.innerHTML = xhr.responseText;
wdt.style.display = 'block';
})();
/*]]>*/</script>

0 comments on commit 406c8d8

Please sign in to comment.