Bug Tracker

Modify

Ticket #10657 (closed enhancement: fixed)

Opened 20 months ago

Last modified 12 months ago

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:
Blocking: Blocked by:

Description (last modified by rwaldron) (diff)

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

jQuery 1.8?

Change History

comment:1 Changed 20 months ago by rwaldron

  • Keywords 1.8-discuss added
  • Priority changed from undecided to high
  • Status changed from new to open
  • Component changed from unfiled to core
  • Milestone changed from None to 1.8

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

comment:2 Changed 20 months ago by gnarf

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

comment:3 Changed 20 months ago by rwaldron

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

Version 0, edited 20 months ago by rwaldron (next)

comment:4 Changed 20 months 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 20 months 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 20 months ago by tj@…

+1, deprecate for 1.8, remove in 1.9.

comment:7 Changed 20 months ago by anonymous

+1

comment:8 Changed 20 months ago by mofle

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

comment:9 Changed 20 months ago by anonymous

+1, I agree with mofle.

comment:10 Changed 19 months ago by Quozzo

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

comment:11 Changed 19 months 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 18 months ago by jzaefferer

  • Description modified (diff)

+1

comment:13 Changed 18 months ago by jaubourg

+1, for deprecating, not removing

comment:14 Changed 18 months ago by mikesherov

+1, deprecate only

comment:15 Changed 18 months 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 18 months ago by rwaldron

  • Description modified (diff)

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

comment:17 Changed 14 months ago by cosinusweb@…

+1 for deprecating not removing

comment:18 Changed 14 months ago by shahyar

+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 14 months ago by dmethvin

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:20 Changed 13 months ago by dmethvin

  • Status changed from open to closed
  • Resolution set to fixed

Docs updated.

comment:21 Changed 12 months ago by dmethvin

  • Summary changed from Deprecate/remove jQuery#size() in favor of jQuery#length to Deprecate jQuery#size() in favor of jQuery#length

Clarifying the title to reflect the action taken in 1.8.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.