Skip to main content

Bug Tracker

Side navigation

#10657 closed enhancement (fixed)

Opened November 03, 2011 09:28PM UTC

Closed May 21, 2012 03:33AM UTC

Last modified June 25, 2012 02:07AM UTC

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

Please consider deprecating/removing jQuery#size() in favor of jQuery#length.

jQuery 1.8?

Attachments (0)
Change History (21)

Changed November 03, 2011 09:34PM UTC by rwaldron comment:1

component: unfiledcore
keywords: → 1.8-discuss
milestone: None1.8
priority: undecidedhigh
status: newopen

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

Changed November 04, 2011 08:30PM UTC by gnarf comment:2

+1, I'm definitely in favor of this...

Changed November 04, 2011 08:31PM UTC by rwaldron comment:3

_comment0: +1, Of course! Add to back compat plugin!1321027471809372

+1, Of course! Add to back compat plugin!

EDIT: There are no internal uses of jQuery.fn.size()

Changed November 04, 2011 09:27PM UTC by timmywil comment:4

+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.

Changed November 04, 2011 09:40PM UTC by ajpiano comment:5

+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?

Changed November 09, 2011 11:53AM UTC by tj@crowdersoftware.com comment:6

+1, deprecate for 1.8, remove in 1.9.

Changed November 09, 2011 07:24PM UTC by anonymous comment:7

+1

Changed November 11, 2011 08:44AM UTC by mofle comment:8

+1

Why was this added in the first place? It's the same number of characters as ".length".

Changed November 11, 2011 09:55AM UTC by anonymous comment:9

+1, I agree with mofle.

Changed December 07, 2011 12:18AM UTC by Quozzo comment:10

+1 I never even know this existed, .length FTW!

Changed December 10, 2011 07:10PM UTC by dmethvin comment:11

+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.

Changed December 13, 2011 02:57PM UTC by jzaefferer comment:12

description: Please consider deprecating/removing jQuery#size() in favor of jQuery#length. \ \ jQuery 1.8?Please consider deprecating/removing jQuery#size() in favor of jQuery#length.\ \ jQuery 1.8?

+1

Changed December 13, 2011 04:20PM UTC by jaubourg comment:13

+1, for deprecating, not removing

Changed December 14, 2011 01:20PM UTC by mikesherov comment:14

+1, deprecate only

Changed December 14, 2011 04:10PM UTC by timmywil comment:15

+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.

Changed December 14, 2011 04:52PM UTC by rwaldron comment:16

description: Please consider deprecating/removing jQuery#size() in favor of jQuery#length.\ \ jQuery 1.8?Please consider deprecating/removing jQuery#size() in favor of jQuery#length. \ \ jQuery 1.8?

+1, Deprecate, yes, but why delay? Why not drop it and offer it in a back compat plugin

Changed April 19, 2012 02:00PM UTC by cosinusweb@gmail.com comment:17

+1 for deprecating not removing

Changed April 23, 2012 06:41PM UTC by shahyar comment:18

+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.

Changed April 23, 2012 06:42PM UTC by dmethvin comment:19

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.

Changed May 21, 2012 03:33AM UTC by dmethvin comment:20

resolution: → fixed
status: openclosed

Docs updated.

Changed June 25, 2012 02:07AM UTC by dmethvin comment:21

summary: Deprecate/remove jQuery#size() in favor of jQuery#lengthDeprecate jQuery#size() in favor of jQuery#length

Clarifying the title to reflect the action taken in 1.8.