Bug Tracker

Modify

Ticket #11386 (closed bug: cantfix)

Opened 15 months ago

Last modified 15 months ago

for ... in syntax works incorrectly with arguments object on safari 5

Reported by: folioforsto Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

for in syntax won't iterate through every property of a arguments object in a function context.

This bug affects the jquery.extend function.

Because the implementation trys to iterate through every property of an object using this approach.

Implementation:  https://github.com/jquery/jquery/blob/master/src/core.js#L333

My currently work around for this is to create a copy of the arguments object before passing it to the jquery.extend function.

See a demo of the bug:  http://jsbin.com/akanov/7

Tested Chrome and it works as expected.

Change History

comment:1 Changed 15 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to cantfix

This should be reported to Safari. It does not make sense to work around it inside jQuery.

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.