Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10997 closed bug (wontfix)

Remove/deprecate/document sneak-dependency methods

Reported by: dmethvin Owned by:
Priority: low Milestone: None
Component: misc Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Rick Waldron)

Some methods are ambiguous, creating "sneak" dependencies that are going to confuse Closure Compiler and also thwart manual attempts to reduce size.

  • jQuery.fn.load() - Either needs event.js or ajax.js; only the arguments tell for sure. Can we deprecate/remove one or both to make it unambiguous? At minimum need to document effect of its use.
  • jQuery.fn.show(), jQuery.fn.hide() - Needs effects.js only if a speed is provided. Can we deprecate the animation-related ones? Again, we at least need to document it.

As a starting point I suggest we deprecate the event behavior of .load() and the animate behavior of .show()/.hide(), removing them in 2.0. Perhaps we could put in a jQuery.error() if .load() detects it's being called all event-like.

Are there other examples?

Change History (9)

comment:1 Changed 11 years ago by dmethvin

Component: unfiledmisc
Keywords: 1.8-discuss added
Milestone: None1.8
Priority: undecidedlow
Status: newopen

comment:2 Changed 11 years ago by Rick Waldron

With jQuery.fn.show/jQuery.fn.hide they are "members" of effects.js... Maybe I've misunderstood?

comment:3 Changed 11 years ago by dmethvin

Sorry, what I meant was that for the no-args case they are just css display changers, but for all other cases they need .animate(). It would be good to be able to keep the simple show/hide but not require all of effects. Or maybe we should tell people who want to do that to use classes and avoid show/hide unless they want to include effects.js?

comment:4 Changed 11 years ago by Timmy Willison

+0, I don't think this can actually happen. Not having to included effects for the simple usage of show/hide would be nice and .load() is unfortunately ambiguous, but backwards compatibility will always be important. Also, I thought John said there was never going to be a 2.0.

comment:5 Changed 11 years ago by jzaefferer

Description: modified (diff)

+1, animated show/hide always looked bad - overloaded load is just bad.

comment:6 Changed 11 years ago by jaubourg

+0, Let's investigate properly first... also, I'd like to see if we could use Closure to help here.

comment:7 Changed 11 years ago by mikesherov

-1

comment:8 Changed 11 years ago by Rick Waldron

Description: modified (diff)

-1

comment:9 Changed 11 years ago by dmethvin

Keywords: 1.8-discuss removed
Milestone: 1.8None
Resolution: wontfix
Status: openclosed

Voted down, but I may do some of this as we investigate the Closure integration.

Note: See TracTickets for help on using tickets.