Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#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 10 years ago by Lupus Michaelis

I did a pull request.

comment:2 Changed 10 years ago by Scott González

Resolution: wontfix
Status: newclosed

We don't support modifying Object.prototype.

comment:3 Changed 8 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.