Opened 11 years ago

Closed 11 years ago

#8182 closed bug (notabug)

$.extend with modified object prototype

Reported by: markQuery Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.core Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:


The code

$.extend( $.ui, {

$.ui.plugin is deprecated. Use the proxy pattern instead. plugin: {

add: function( module, option, set ) {

var proto = $.ui[ module ].prototype; for ( var i in set ) {

Is using the syntax. If the prototype of the Javascript object has been extended this breaks. Instead it should probably use for ( var j = 0; j < set.length; ++j )

Sorry I am not very familiar with Javascript or jQuery so it would be a lot of effort to make a test case. I'm seeing the problem on a private site.

Change History (1)

comment:1 Changed 11 years ago by Scott González

Resolution: invalid
Status: newclosed

jQuery doesn't support modifying Object.prototype.

Note: See TracTickets for help on using tickets.