* Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
(view: ViewBase)
| 1054 | * Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation. |
| 1055 | */ |
| 1056 | public _removeView(view: ViewBase) { |
| 1057 | if (Trace.isEnabled()) { |
| 1058 | Trace.write(`${this}._removeView(${view})`, Trace.categories.ViewHierarchy); |
| 1059 | } |
| 1060 | |
| 1061 | if (view.parent !== this) { |
| 1062 | throw new Error('View not added to this instance. View: ' + view + ' CurrentParent: ' + view.parent + ' ExpectedParent: ' + this); |
| 1063 | } |
| 1064 | |
| 1065 | if (this.domNode) { |
| 1066 | this.domNode.onChildRemoved(view); |
| 1067 | } |
| 1068 | |
| 1069 | this._removeViewCore(view); |
| 1070 | view.parent = undefined; |
| 1071 | view._parentChanged(this); |
| 1072 | } |
| 1073 | |
| 1074 | /** |
| 1075 | * Method is intended to be overridden by inheritors and used as "protected" |
nothing calls this directly
no test coverage detected