bug #14170 Fix the AJAX profiling (stof)
This PR was merged into the 2.6 branch.
Discussion
----------
Fix the AJAX profiling
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | reported in https://github.com/symfony/symfony/issues/13447#issuecomment-88849938
| License | MIT
| Doc PR | n/a
The fix for IE8 (#13978) 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.
Commits
-------
9d6c0b1
Fix the AJAX profiling
This commit is contained in:
commit
ba84ac87b8
@ -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) {
|
||||
|
Reference in New Issue
Block a user