MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / waitUntilNavigatedFrom

Function waitUntilNavigatedFrom

apps/automated/src/ui-helper.ts:202–213  ·  view source on GitHub ↗
(action: Function, topFrame?: Frame)

Source from the content-addressed store, hash-verified

200}
201
202export function waitUntilNavigatedFrom(action: Function, topFrame?: Frame) {
203 const currentPage = topFrame ? topFrame.currentPage : Frame.topmost().currentPage;
204 let completed = false;
205 function navigatedFrom(args) {
206 args.object.page.off('navigatedFrom', navigatedFrom);
207 completed = true;
208 }
209
210 currentPage.on('navigatedFrom', navigatedFrom);
211 action();
212 TKUnit.waitUntilReady(() => completed);
213}
214
215export function waitUntilLayoutReady(view: View): void {
216 TKUnit.waitUntilReady(() => view.isLayoutValid);

Callers 2

navigateWithEntryFunction · 0.85
goBackFunction · 0.85

Calls 3

onMethod · 0.65
actionFunction · 0.50
topmostMethod · 0.45

Tested by

no test coverage detected