X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.htmlform.checker.js;h=473635a53ef63514c41734903cbc20389ae80ce1;hb=a6827329000ec584a2614a167c79616c08c21ce7;hp=33207d49a74fe18f69a2f6d8d79c0e01df06185e;hpb=b37fca1cb6c04bd71dec687400ed55a518c19b85;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; };