mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge pull request #19220 from twbs/jq-event-alias-throw-err
js/tests/index.html: Replace jQuery event alias methods with functions that throw errors
This commit is contained in:
commit
9b4cfdceda
1 changed files with 4 additions and 1 deletions
|
@ -44,7 +44,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…
Reference in a new issue