* Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has completed. * if the given child implements an onDeactivateEvent() method, that method will be called once the child is removed from this container. * @param {Renderable|Sprite|Co
(child, keepalive)
| 774 | * @param {boolean} [keepalive=false] - true to prevent calling child.destroy() |
| 775 | */ |
| 776 | removeChild(child, keepalive) { |
| 777 | if (this.hasChild(child)) { |
| 778 | defer(deferredRemove, this, child, keepalive); |
| 779 | } else { |
| 780 | throw new Error("Child is not mine."); |
| 781 | } |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Removes (and optionally destroys) a child from the container.<br> |
no test coverage detected