diff --git a/src/DebugBar/JavascriptRenderer.php b/src/DebugBar/JavascriptRenderer.php index 9539630..f06c820 100644 --- a/src/DebugBar/JavascriptRenderer.php +++ b/src/DebugBar/JavascriptRenderer.php @@ -72,9 +72,9 @@ class JavascriptRenderer protected $ajaxHandlerBindToFetch = false; - protected $ajaxHandlerBindToJquery = true; + protected $ajaxHandlerBindToJquery = false; - protected $ajaxHandlerBindToXHR = false; + protected $ajaxHandlerBindToXHR = true; protected $ajaxHandlerAutoShow = true; @@ -509,6 +509,7 @@ class JavascriptRenderer * Sets whether to call bindToJquery() on the ajax handler * * @param boolean $bind + * @deprecated use setBindAjaxHandlerToXHR */ public function setBindAjaxHandlerToJquery($bind = true) { @@ -520,6 +521,7 @@ class JavascriptRenderer * Checks whether bindToJquery() will be called on the ajax handler * * @return boolean + * @deprecated use isAjaxHandlerBoundToXHR */ public function isAjaxHandlerBoundToJquery() { diff --git a/src/DebugBar/Resources/debugbar.js b/src/DebugBar/Resources/debugbar.js index 93756f8..f359350 100644 --- a/src/DebugBar/Resources/debugbar.js +++ b/src/DebugBar/Resources/debugbar.js @@ -1204,10 +1204,7 @@ if (typeof(PhpDebugBar) == 'undefined') { }, /** - * Attaches an event listener to jQuery.ajaxComplete() - * - * @this {AjaxHandler} - * @param {jQuery} jq Optional + * @deprecated use bindToXHR instead */ bindToJquery: function(jq) { var self = this; diff --git a/tests/DebugBar/Tests/full_init.html b/tests/DebugBar/Tests/full_init.html index ab749e6..0e14490 100644 --- a/tests/DebugBar/Tests/full_init.html +++ b/tests/DebugBar/Tests/full_init.html @@ -9,5 +9,5 @@ phpdebugbar.setDataMap({ }); phpdebugbar.restoreState(); phpdebugbar.ajaxHandler = new PhpDebugBar.AjaxHandler(phpdebugbar, undefined, true); -if (jQuery) phpdebugbar.ajaxHandler.bindToJquery(jQuery); +phpdebugbar.ajaxHandler.bindToXHR(); phpdebugbar.addDataSet(