mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
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]
This commit is contained in:
parent
a42875afe7
commit
66c81fe4a1
@ -43,7 +43,10 @@
|
|||||||
'undelegate'
|
'undelegate'
|
||||||
]
|
]
|
||||||
for (var i = 0; i < eventAliases.length; i++) {
|
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>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user