Bug Tracker

Changes between Version 1 and Version 2 of Ticket #9937, comment 4


Ignore:
Timestamp:
Aug 16, 2011, 5:44:54 AM (12 years ago)
Author:
Robert Katić
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9937, comment 4

    v1 v2  
    1 Deferred have no states exposed, jsXHR have -- so, as you pointed, former objects can be duplicated (deep extend) with no issues.
     1Deferred have no states exposed, jqXHR have -- so, as you pointed, former objects can be duplicated (deep extend) with no issues, but jqXHR can not.
    22
    33However, even in case Deferred will never expose states in future, $.isPlainObject itself is part of the public API, and using it against those objects will give unexpected results.
     
    66No-one is proposing to move methods to Deferred.prototype, if that was your concern.
    77
    8 Even if $.isPlainObject is mainly implemented by me, I always was against it because of similar issues. Now we have it in public API, and we have to deal with it. In case of Deferred, changing docs a bit would probably be enough (!?), but that would not be good enough for jsXHR anyway.
     8Even if $.isPlainObject is mainly implemented by me, I always was against it because of similar issues. Now we have it in public API, and we have to deal with it. In case of Deferred, changing docs a bit would probably be enough (!?), but that would not be good enough for jqXHR anyway.
    99
    1010> I dunno. Would the need be widespread enough to warrant some kind of "atomic object" registry that $.extend would look into to control if an object can be deep extended? I'm really no sure myself.