Skip to main content

Search and Top Navigation

#6099 closed bug (wontfix)

Opened September 23, 2010 11:18AM UTC

Closed September 23, 2010 01:02PM UTC

Last modified October 11, 2012 09:15PM UTC

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:

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).

Attachments (0)
Change History (3)

Changed September 23, 2010 11:22AM UTC by Lupus Michaelis comment:1

I did a pull request.

Changed September 23, 2010 01:02PM UTC by scottgonzalez comment:2

resolution: → wontfix
status: newclosed

We don't support modifying Object.prototype.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted