From 7c83654d77e5d9a304eff8fe6814c578e70c4a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Ren=C3=A9e=20Beach?= Date: Thu, 18 Oct 2012 11:28:59 -0300 Subject: [PATCH] Update src/callbacks.js Return the length of the Callback list property so that a client can determine the number of callbacks currently managed by the Callbacks instance. --- src/callbacks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/callbacks.js b/src/callbacks.js index 6fda47f00f..eb06b29f10 100644 --- a/src/callbacks.js +++ b/src/callbacks.js @@ -85,6 +85,8 @@ jQuery.Callbacks = function( options ) { }, // Actual Callbacks object self = { + // Return the number of callbacks currently stored + length: list.length, // Add a callback or a collection of callbacks to the list add: function() { if ( list ) {