Fix the AJAX profiling

The fix for IE8 which does not have the addEventListener method on
XMLHttpRequest broke the feature for modern browsers because it was
checking the existence on the wrong object. It is a method on the
instance, not on the "class", and so should be checked on the prototype.
This commit is contained in:
Christophe Coevoet 2015-04-02 11:50:50 +02:00
parent de02c5f962
commit 9d6c0b1c30

View File

@ -196,7 +196,7 @@
}
{% if excluded_ajax_paths is defined %}
if (window.XMLHttpRequest && XMLHttpRequest.addEventListener) {
if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) {
var proxied = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {