HostController interface
@microsoft/fast-element > HostController
HostController interface
Controls the lifecycle and context of behaviors and styles associated with a component host.
Signature:
export interface HostController<TSource = any> extends ExpressionController<TSource>
Extends: ExpressionController<TSource>
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
| boolean | Indicates whether the host is connected or not. | |
ElementStyles | null | The main set of styles used for the component, independent of any behavior-specific styles. |
Methods
Method | Description |
---|---|
Adds the behavior to the component. | |
Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot. | |
Removes the behavior from the component. | |
Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot. |