1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-16 21:08:34 +01:00

Feat deprecate bindtojquery (#629)

* Deprecate bindToJquery

* Tweak
This commit is contained in:
Barry vd. Heuvel 2024-03-20 13:35:26 +01:00 committed by GitHub
parent 3668109b2e
commit 42beef04ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 7 deletions

View File

@ -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()
{

View File

@ -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;

View File

@ -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(