From: Chris Rebert Date: Tue, 16 Feb 2016 12:05:41 +0000 (-0800) Subject: Port #19220 to v3 X-Git-Tag: v3.3.7~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66c81fe4a14a783bf371b279fac32c7a111d79b8;p=thirdparty%2Fbootstrap.git Port #19220 to v3 js/tests/index.html: Replace jQuery event alias methods with functions that throw explanatory errors, instead of with undefined Refs https://github.com/twbs/bootstrap/pull/19219#issuecomment-184653699 [skip validator] --- diff --git a/js/tests/index.html b/js/tests/index.html index e1fa85131e..e9868d63bc 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -43,7 +43,10 @@ 'undelegate' ] for (var i = 0; i < eventAliases.length; i++) { - $.fn[eventAliases[i]] = undefined + var eventAlias = eventAliases[i] + $.fn[eventAlias] = function () { + throw new Error('Using the ".' + eventAlias + '()" method is not allowed, so that Bootstrap can be compatible with custom jQuery builds which exclude the "event aliases" module that defines said method. See https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js') + } } })()