MCPcopy
hub / github.com/winjs/winjs / whenLoadingComplete

Function whenLoadingComplete

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

Source from the content-addressed store, hash-verified

254 }
255
256 export function whenLoadingComplete(listview, func) {
257 function checkAndExecute() {
258 if (listview.loadingState === "complete") {
259 func();
260 }
261 }
262
263 listview.addEventListener("loadingstatechanged", LiveUnit.GetWrappedCallback(checkAndExecute), false);
264 checkAndExecute();
265 }
266
267 export function runTests(listview, tests) {
268 var current = 0;

Callers 1

runTestsFunction · 0.70

Calls 2

checkAndExecuteFunction · 0.70
addEventListenerMethod · 0.65

Tested by

no test coverage detected