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

Method close

apps/toolbox/src/pages/sample-modal.ts:32–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31export class SampleModal extends Observable {
32 close() {
33 // TODO: a11y
34 // if (global.isIOS) {
35 // (<UIViewController>page.ios).view.accessibilityPerformEscape();
36 // }
37 if (typeof closeCallback === 'function') {
38 closeCallback('data from modal');
39 // reset callback...
40 closeCallback = undefined;
41 } else {
42 // fallback to regular nav back...
43 page.frame.goBack();
44 }
45 }
46}

Callers 1

createRandomFunction · 0.45

Calls 1

goBackMethod · 0.45

Tested by

no test coverage detected