Modify ↓
Ticket #3785 (closed enhancement: wontfix)
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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/