* Adds a callback to be called on anchoring the Component to the DOM. * If the Component is already anchored, the callback is called immediately. * * @param {ComponentCallback} callback * @return {Component}
(callback: ComponentCallback)
| 142 | * @return {Component} |
| 143 | */ |
| 144 | public onAnchor(callback: ComponentCallback) { |
| 145 | if (this._isAnchored) { |
| 146 | callback(this); |
| 147 | } |
| 148 | this._onAnchorCallbacks.add(callback); |
| 149 | return this; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Removes a callback that would be called on anchoring the Component to the DOM. |
no test coverage detected