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


Ignore:
Timestamp:
Aug 24, 2012, 9:16:07 AM (7 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15884, comment 4

    v1 v2  
    33During initialization, when _WidgetBase applies the attributes (ie, calls custom setters for each attribute), _WidgetBase calls _setContentAttr(empty-document-fragment).    _WidgetBase expects that call to be synchronous, but it isn't.   _setContentAttr() calls _setContent(), and that calls setter.set(), that calls dojox/html/_base.js::onEnd(), and that calls ready(), to wait for any possible <script>require(...)</script> type blocks (in the !ContentPane content) to complete running.
    44
    5 So, while ready() is "blocking", _WidgetBase continues applying attributes, and calls_setHrefAttr().   _setHrefAttr() creates the onLoadDeferred to signal when the href has finished downloading and parser.     Then while that href download is running, ready() stops blocking, so it calls _onLoadHandler, and resolves the onLoadDeferred created by _setHrefAttr().
     5So, while ready() is "blocking", _WidgetBase continues applying attributes, and calls_setHrefAttr().   _setHrefAttr() creates the onLoadDeferred to signal when the href has finished downloading and parsing.     Then while that href download is running, ready() stops blocking, so it calls _onLoadHandler, and resolves the onLoadDeferred created by _setHrefAttr().
    66
    77In other words, _setContentAttr() and _setHrefAttr() unexpectedly overlap each other, and the problem is made worse because there's a instance-level onLoadDeferred property that gets confused between them.