Opened 15 years ago
Closed 15 years ago
#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: | |
Blocked by: | Blocking: |
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 ?
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/