locked
Some WinJS controls inside a HubSection have not been processed when WinJS.UI.Pages.processed is called

    Question

  • In my processed handler I querySelect a certain element and want to access its ".winControl". However, on slow devices it very often happens, that the item has not been processed by WinJS.UI.processAll call that precedes the call to my processed handler. When using a debugger and a breakpoint right at the entry of my processed handler, the code works always though.

    What can that be? It seems the HubSections do their own WinJS.UI.processAll with their content and my handler is called before all hub sections have been loaded.

    Monday, April 7, 2014 11:10 AM

All replies

  • Ah, ok. It seems I need to wait for the hubs loadingstate to switch to "complete" before I can access the processed elements inside the hub sections.

    In my hub.onloadingstatechanged handler I also get now events from ListViews inside the HubSections. Is that intentional?

    hub.onloadingstatechanged = (function(_this) {
            return function(event) {
              if (event.srcElement === hub.element && event.detail.loadingState === "complete") {
                _this._hubReady(hub);
                return hub.onloadingstatechanged = null;
              }
            };
          })(this);


    • Edited by pkursawe Monday, April 7, 2014 11:27 AM
    Monday, April 7, 2014 11:26 AM