#6099 closed bug (wontfix)
Dialog options conflict with augmented javascript Object
Reported by: | Lupus Michaelis | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.dialog | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When you augment the core Javascript Object like that:
Object.prototype.base = function(attribute) { /* Do whatever you want */ }
It conflicts with the handling of options in UI.Dialog. It iterates each attribute of the options object, assuming the core Object is bare and never was modified. By the way, UI.Dialog assume that function in option objects are actual HTML objects or equivalent. Add a check could be a good idea.
So said, I did a quickfix that discards attributes from the prototype chain. But they're maybe a clever way to fix it (like check the options are awaited).
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We don't support modifying Object.prototype.
Note: See
TracTickets for help on using
tickets.
I did a pull request.