Side navigation
#3785 closed enhancement (wontfix)
Opened January 05, 2009 05:44PM UTC
Closed January 07, 2009 02:46AM UTC
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 ?
Attachments (0)
Change History (1)
Changed January 07, 2009 02:46AM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
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/