Skip to content

Commit

Permalink
Port #19220 to v3
Browse files Browse the repository at this point in the history
js/tests/index.html: Replace jQuery event alias methods with functions that throw explanatory errors, instead of with undefined

Refs #19219 (comment)

[skip validator]
  • Loading branch information
cvrebert committed Feb 16, 2016
1 parent a42875a commit 66c81fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
})()
</script>
Expand Down

0 comments on commit 66c81fe

Please sign in to comment.