(parent, childViews)
| 1 | export const removeChildView = (parent, childViews) => view => { |
| 2 | // remove from child views |
| 3 | childViews.splice(childViews.indexOf(view), 1); |
| 4 | |
| 5 | // remove the element |
| 6 | if (view.element.parentNode) { |
| 7 | parent.removeChild(view.element); |
| 8 | } |
| 9 | |
| 10 | return view; |
| 11 | }; |