Bug Tracker

Opened 8 years ago

Last modified 7 years ago

#10657 closed enhancement

Deprecate/remove jQuery#size() in favor of jQuery#length — at Version 16

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 Rick Waldron)

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

jQuery 1.8?

Change History (16)

comment:1 Changed 8 years ago by Rick Waldron

Component: unfiledcore
Keywords: 1.8-discuss added
Milestone: None1.8
Priority: undecidedhigh
Status: newopen

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

comment:2 Changed 8 years ago by gnarf

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

comment:3 Changed 8 years ago by Rick Waldron

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

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

Last edited 8 years ago by Rick Waldron (previous) (diff)

comment:4 Changed 8 years ago by timmywil

+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 8 years ago by ajpiano

+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:6 Changed 8 years ago by tj@…

+1, deprecate for 1.8, remove in 1.9.

comment:7 Changed 8 years ago by anonymous

+1

comment:8 Changed 8 years ago by mofle

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

comment:9 Changed 8 years ago by anonymous

+1, I agree with mofle.

comment:10 Changed 8 years ago by Quozzo

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

comment:11 Changed 8 years ago by dmethvin

+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:12 Changed 8 years ago by jzaefferer

Description: modified (diff)

+1

comment:13 Changed 8 years ago by jaubourg

+1, for deprecating, not removing

comment:14 Changed 8 years ago by mikesherov

+1, deprecate only

comment:15 Changed 8 years ago by timmywil

+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 8 years ago by Rick Waldron

Description: modified (diff)

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

Note: See TracTickets for help on using tickets.