Add jquery-throttle-debounce to core
authorGergő Tisza <tgr.huwiki@gmail.com>
Wed, 12 Feb 2014 21:18:08 +0000 (21:18 +0000)
committerGergő Tisza <tgr.huwiki@gmail.com>
Thu, 13 Feb 2014 21:05:16 +0000 (21:05 +0000)
commitac26b2e7ca736042545f096c241fdb92b56cc44f
tree120c5bd3aad3d3c034d4387a27996e15d041212e
parentf0ee9f1899a7be2312e58dc434f41dfc95288b58
Add jquery-throttle-debounce to core

This is currently used by MultimediaViewer, but it is also needed
by UploadWizard (and probably useful to several other projects).

Similar to jquery.delayedBind (which is already in core), but has
several advantages:
* can also do throttling (fire event every N ms) which is better
  suited to some events (e.g. scroll) than debouncing (check every
  N ms if there are still events, only fire once they stopped)
* not coupled with event binding, it just takes a function and
  returns a throttled/debounced function. This means it can be used
  in ways delayedBind cannot (e.g. event delegation), or with non-
  event-based callbacks.
* widely used external project with good documentation, tests etc:
  https://github.com/cowboy/jquery-throttle-debounce

On the minus side, the project has been inactive for years and
originally written for jQuery 1.3. Given that it is extremely simple
and does not depend on jQuery at all (just registers itself in the
jQuery namespace), that should not be a problem.

Change-Id: I008f46cc97af10e93ad9cad35924aaf251b99aa6
.jshintignore
RELEASE-NOTES-1.23
resources/Resources.php
resources/jquery/jquery.ba-throttle-debounce.js [new file with mode: 0644]