aboutsummaryrefslogtreecommitdiff
path: root/js/tests/index.html
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2016-02-16 04:05:41 -0800
committerChris Rebert <[email protected]>2016-02-16 04:05:41 -0800
commitff4792fcefbe7369c95cf7b2d06e7d211b1c3991 (patch)
treee71a8f6b1fc329da7904dc879ae143d5672c6bb2 /js/tests/index.html
parentaf68bc2c7312712fa6df9acc4fb5655168b55db8 (diff)
downloadbootstrap-ff4792fcefbe7369c95cf7b2d06e7d211b1c3991.tar.xz
bootstrap-ff4792fcefbe7369c95cf7b2d06e7d211b1c3991.zip
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]
Diffstat (limited to 'js/tests/index.html')
-rw-r--r--js/tests/index.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/tests/index.html b/js/tests/index.html
index a91725cc5..e4cbae42f 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')
+ }
}
})()
</script>