* Checks if this container is root or if it's attached to the root container. * @returns {boolean} true if this container is root or if it's attached to the root container
()
| 720 | * @returns {boolean} true if this container is root or if it's attached to the root container |
| 721 | */ |
| 722 | isAttachedToRoot() { |
| 723 | if (this.root === true) { |
| 724 | return true; |
| 725 | } else { |
| 726 | let ancestor = this.ancestor; |
| 727 | while (ancestor) { |
| 728 | if (ancestor.root === true) { |
| 729 | return true; |
| 730 | } |
| 731 | ancestor = ancestor.ancestor; |
| 732 | } |
| 733 | return false; |
| 734 | } |
| 735 | } |
| 736 | |
| 737 | /** |
| 738 | * Returns the instance of the root container (i.e. the current application World container). |
no outgoing calls
no test coverage detected