MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / _pushInFrameStack

Function _pushInFrameStack

packages/core/ui/frame/frame-stack.ts:17–29  ·  view source on GitHub ↗
(frame: FrameBase)

Source from the content-addressed store, hash-verified

15}
16
17export function _pushInFrameStack(frame: FrameBase): void {
18 if (frame._isInFrameStack && frameStack[frameStack.length - 1] === frame) {
19 return;
20 }
21
22 if (frame._isInFrameStack) {
23 const indexOfFrame = frameStack.indexOf(frame);
24 frameStack.splice(indexOfFrame, 1);
25 }
26
27 frameStack.push(frame);
28 frame._isInFrameStack = true;
29}
30
31export function _popFromFrameStack(frame: FrameBase): void {
32 if (!frame._isInFrameStack) {

Callers 1

_pushInFrameStackMethod · 0.90

Calls 3

indexOfMethod · 0.80
spliceMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected