X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.htmlform.checker.js;h=473635a53ef63514c41734903cbc20389ae80ce1;hp=33207d49a74fe18f69a2f6d8d79c0e01df06185e;hb=a1ef77b2d80830fbcb617a83961d78cff9d6e384;hpb=9bbb26ffbd16edbaccce27461730fa9e172aa048 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; };