From 9d6c0b1c30724a99c1732d3b3bd0951d7f007a6f Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 2 Apr 2015 11:50:50 +0200 Subject: [PATCH] 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. --- .../Resources/views/Profiler/base_js.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 502ee36fcd..070c7888bc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -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) {