From: Chris Rebert Date: Tue, 16 Feb 2016 11:52:30 +0000 (-0800) Subject: Port #19219 to v3 X-Git-Tag: v3.3.7~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18966%2Fhead;p=thirdparty%2Fbootstrap.git Port #19219 to v3 CONTRIBUTING: Document restriction regarding jQuery event alias methods Refs #19192 [ci skip] --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b5309368f..d102d5e380 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -250,6 +250,7 @@ includes code changes) and under the terms of the - 2 spaces (no tabs) - strict mode - "Attractive" +- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](http://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](http://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded. ### Checking coding style