Bug Tracker

Modify

Ticket #6253 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

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

Description

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

comment:1 Changed 3 years ago by snover

  • Milestone 1.4.3 deleted

Resetting milestone to future.

comment:2 Changed 3 years ago by snover

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to invalid

Yes, this is intended.

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.