Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6253 closed bug (invalid)

$.proxy incorrectly passes $.proxy arguments to proxied function

Reported by: originofstorms Owned by:
Priority: undecided Milestone:
Component: core Version: 1.4.2
Keywords: proxy Cc:
Blocked by: Blocking:


I believe theres a problem with $.proxy. If you call

  $.proxy(object, "method")()

object.method is passed the arguments passed to $.proxy... effectively

  object.method(object, "method");

A quick look at the $.proxy source reveals the following:

  proxy: function( fn, proxy, thisObject ) {
    // ... elided ...
    proxy = function() {
      return fn.apply( thisObject || this, arguments );
    // ... elided ...
    return proxy;

Is there a reason for arguments to be passed on through?

Oddly, this causes problems on FF 3.6.2, but not Chromium 5.0.344.0.

Change History (2)

comment:1 Changed 12 years ago by snover

Milestone: 1.4.3

Resetting milestone to future.

comment:2 Changed 12 years ago by snover

Priority: undecided
Resolution: invalid
Status: newclosed

Yes, this is intended.

Note: See TracTickets for help on using tickets.