From ff4792fcefbe7369c95cf7b2d06e7d211b1c3991 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 16 Feb 2016 04:05:41 -0800 Subject: [PATCH] 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] --- js/tests/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/tests/index.html b/js/tests/index.html index a91725cc5d..e4cbae42fe 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -44,7 +44,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') + } } })()