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:
parent
de02c5f962
commit
9d6c0b1c30
@ -196,7 +196,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
{% if excluded_ajax_paths is defined %}
|
{% if excluded_ajax_paths is defined %}
|
||||||
if (window.XMLHttpRequest && XMLHttpRequest.addEventListener) {
|
if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) {
|
||||||
var proxied = XMLHttpRequest.prototype.open;
|
var proxied = XMLHttpRequest.prototype.open;
|
||||||
|
|
||||||
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
|
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
|
||||||
|
Reference in New Issue
Block a user