MCPcopy
hub / github.com/winjs/winjs / ExecuteWhenLoadingComplete

Function ExecuteWhenLoadingComplete

tests/TestLib/Helper.ListView.Utils.ts:377–386  ·  view source on GitHub ↗
(listview, func)

Source from the content-addressed store, hash-verified

375 Helper.ListView.Utils.logTestComment("Running asynchronous tests");
376
377 function ExecuteWhenLoadingComplete(listview, func) {
378 function CheckAndExecute() {
379 if (listview.loadingState === "complete") {
380 func();
381 }
382 }
383
384 listview.addEventListener("loadingstatechanged", LiveUnit.GetWrappedCallback(CheckAndExecute), false);
385 CheckAndExecute();
386 }
387
388 function ListViewStateChanged() {
389 LiveUnit.LoggingCore.logComment("ListView State Changed loadingState=" + listview.loadingState);

Callers 1

runTestsFunction · 0.85

Calls 2

CheckAndExecuteFunction · 0.85
addEventListenerMethod · 0.65

Tested by

no test coverage detected