Bug Tracker

Modify

Ticket #3785 (closed enhancement: wontfix)

Opened 4 years ago

Last modified 4 years ago

handle css object options containing functions

Reported by: djeang Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: css prototype Cc:
Blocking: Blocked by:

Description

If something like Object.prototype.foo = function() {...} exists in script, any operation like $myEl.css({bgcolor: 'red', ....}); will failed cause the option object contains a property 'foo' that is a function ( result in following error 'name.replace' is not a function line 1115). Is it possible to take care about such a case as it would make jQuery life more friendly with legacy code ?

Change History

comment:1 Changed 4 years ago by dmethvin

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

Do not modify Object.prototype ... that is just one of the horrible things that happen. Rewriting every for/in loop and object membership test is just too expensive.

 http://erik.eae.net/archives/2005/06/06/22.13.54/

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.