MCPcopy
hub / github.com/winjs/winjs / waitForDeferredAction

Function waitForDeferredAction

tests/TestLib/Helper.ListView.ts:126–141  ·  view source on GitHub ↗
(listView)

Source from the content-addressed store, hash-verified

124
125
126 export function waitForDeferredAction(listView) {
127 if (listView.winControl) { listView = listView.winControl; }
128
129 return function (x?) {
130 return new WinJS.Promise(function (complete) {
131 function waitForDeferredAction_handler() {
132 listView.removeEventListener("accessibilityannotationcomplete", waitForDeferredAction_handler, false);
133 WinJS.Utilities._setImmediate(function () {
134 complete(x);
135 });
136 }
137
138 listView.addEventListener("accessibilityannotationcomplete", waitForDeferredAction_handler, false);
139 });
140 }
141 }
142
143 export function waitForReady(listView, delay?) {
144 if (listView.winControl) { listView = listView.winControl; }

Callers

nothing calls this directly

Calls 1

addEventListenerMethod · 0.65

Tested by

no test coverage detected