]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
js/tests/index.html: Replace jQuery event alias methods with functions that throw... 19220/head
authorChris Rebert <github@chrisrebert.com>
Tue, 16 Feb 2016 12:05:41 +0000 (04:05 -0800)
committerChris Rebert <github@chrisrebert.com>
Tue, 16 Feb 2016 12:05:41 +0000 (04:05 -0800)
Refs https://github.com/twbs/bootstrap/pull/19219#issuecomment-184653699

[skip validator]

js/tests/index.html

index a91725cc5d9610f485ef1d41ad9f319367a46d94..e4cbae42fe44fa40354dc12efbb91cef524c9164 100644 (file)
           '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>