Comments (2)
The delegate
method has not been deprecated. The jQuery core team has said that they have no intention of removing delegate
. The verbiage in the docs says it's been "superseded" which does not mean "deprecated". I agree this is confusing, and several people, including myself, have requested that they change the wording to be clearer.
That being said, one might think there is no reason not to change it. However, I much prefer delegate
over on
, because it is much more explicit and easier to tell what is actually happening when scanning through the code, without resorting to analyzing the exact number and order of the arguments being passed to the method (as is necessary when using on
).
from jquery-rails.
@JangoSteve Thanks for the clarification. Yes, I definitely agree that the language is confusing. For people like me who don't read the forums or changelog like I do for Ruby, this would be nicer. I could have sworn that it said deprecated at one point, but oh well.
Yeah, it is more explicit I suppose. As long as you understand that all of those methods are delegating to .on()
eventually, you are just fine....
from jquery-rails.
Related Issues (20)
- url.indexOf is not a function in jQuery.fn.load = function( url, params, callback ) HOT 1
- CVE-2019-5428 HOT 1
- Security issue with jquery 3.4.1 HOT 7
- Issue a security advisory for versions < 4.4.0 HOT 5
- jQuery not loading HOT 3
- jquery-rails with Spockets 4 JS HOT 1
- Dropping `git` in gemspec & using Packaging extension HOT 1
- Update jQuery to v3.6.0 HOT 4
- The Jquery V3.5.0+ already removed trim method.
- Update `jquery-rails` to include new jquery-ujs for better Turbo compatibility HOT 1
- JQuery 3.6.1 released HOT 1
- Rails 7 with importmap HOT 3
- What is the status of v4.5.1 ? HOT 1
- jquery-rails doesn't work correctly in Rails 7 HOT 2
- Drop support for jQuery 1 & 2
- allert does not work HOT 1
- Update jQuery to v3.6.4 HOT 1
- JQuery 3.7.0 released HOT 7
- JQMIGRATE: jQuery.fn.submit() event shorthand is deprecated HOT 1
- jQuery 3.7.1 released HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-rails.