X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.htmlform.checker.js;h=473635a53ef63514c41734903cbc20389ae80ce1;hb=2b29ca0fbb9f2b301074db257a9b33ec870ffebb;hp=33207d49a74fe18f69a2f6d8d79c0e01df06185e;hpb=50ea56e349d62c48c69c22bbdf91514c7a9e77e1;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.htmlform.checker.js b/resources/src/mediawiki.htmlform.checker.js index 33207d49a7..473635a53e 100644 --- a/resources/src/mediawiki.htmlform.checker.js +++ b/resources/src/mediawiki.htmlform.checker.js @@ -3,14 +3,6 @@ // FIXME: mw.htmlform.Element also sets this to empty object mw.htmlform = {}; - function debounce( delay, callback ) { - var timeout; - return function () { - clearTimeout( timeout ); - timeout = setTimeout( Function.prototype.apply.bind( callback, this, arguments ), delay ); - }; - } - /** * @class mw.htmlform.Checker */ @@ -60,7 +52,7 @@ if ( $extraElements ) { $e = $e.add( $extraElements ); } - $e.on( events, debounce( 1000, this.validate.bind( this ) ) ); + $e.on( events, mw.util.debounce( 1000, this.validate.bind( this ) ) ); return this; };