#10657 closed enhancement (fixed)
Deprecate jQuery#size() in favor of jQuery#length
| Reported by: | mathias | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.8 |
| Component: | core | Version: | git |
| Keywords: | 1.8-discuss | Cc: | |
| Blocked by: | Blocking: |
Description (last modified by )
Please consider deprecating/removing jQuery#size() in favor of jQuery#length.
jQuery 1.8?
Change History (21)
comment:1 Changed 6 years ago by
| Component: | unfiled → core |
|---|---|
| Keywords: | 1.8-discuss added |
| Milestone: | None → 1.8 |
| Priority: | undecided → high |
| Status: | new → open |
comment:3 Changed 6 years ago by
+1, Of course! Add to back compat plugin!
EDIT: There are no internal uses of jQuery.fn.size()
comment:4 Changed 6 years ago by
+0, I think it is still used too much. 1.8 will remove some minor things, but it's probably not the right time to remove .size(). I could be wrong tho.
comment:5 Changed 6 years ago by
+1, Probably a good time to at least officially "mark it for death" er, deprecation, so people have ample time and then we pull it in 1.9?/2.0?
comment:8 Changed 6 years ago by
+1 Why was this added in the first place? It's the same number of characters as ".length".
comment:11 Changed 6 years ago by
+1, Deprecate sure; remove in the distant future if ever. This discussion will take 10x the number of bytes the actual method does, and removing it will cause random stuff to break for no good reason.
comment:15 Changed 6 years ago by
+0, It's weird to me to deprecate something that isn't going to get removed, but we already say .length is preferred in the docs.
comment:16 Changed 6 years ago by
| Description: | modified (diff) |
|---|
+1, Deprecate, yes, but why delay? Why not drop it and offer it in a back compat plugin
comment:18 Changed 5 years ago by
+1 for removal. The only internal uses of this are in the test cases, and support can easily be added with a compatibility plugin. jQuery UI uses it in a couple of spots, but I put in a pull request to fix that.
comment:19 Changed 5 years ago by
Honestly, guys, who really cares? More words have already been spilt than this is worth. We do not need any more AOL-style +1s on this thread.
comment:21 Changed 5 years ago by
| Summary: | Deprecate/remove jQuery#size() in favor of jQuery#length → Deprecate jQuery#size() in favor of jQuery#length |
|---|
Clarifying the title to reflect the action taken in 1.8.

This could easily be included in a back-compat plugin (along with jQuery.browser )