Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
insertChild: (parent: NgActionBar, child: NgView, next: any) => {
if (isInvisibleNode(child)) {
return;
} else if (isNavigationButton(child)) {
parent.navigationButton = child;
child.parentNode = parent;
} else if (isActionItem(child)) {
addActionItem(parent, child, next);
child.parentNode = parent;
} else if (isView(child)) {
parent.titleView = child;
}
},
removeChild: (parent: NgActionBar, child: NgView) => {
removeChild: (parent: NgActionBar, child: NgView) => {
if (isInvisibleNode(child)) {
return;
} else if (isNavigationButton(child)) {
if (parent.navigationButton === child) {
parent.navigationButton = null;
}
child.parentNode = null;
} else if (isActionItem(child)) {
parent.actionItems.removeItem(child);
child.parentNode = null;
} else if (isView(child) && parent.titleView && parent.titleView === child) {
parent.titleView = null;
}
}
};