@microsoft/fast-foundation > MatchMediaBehavior
MatchMediaBehavior class
An abstract behavior to react to media queries. Implementations should implement the constructListener method to perform some action based on media query changes.
export declare abstract class MatchMediaBehavior implements Behavior
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(query) | Constructs a new instance of the MatchMediaBehavior class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| query | MediaQueryList | The media query that the behavior operates on. |
Methods
| Method | Modifiers | Description |
|---|---|---|
| bind(source) | Binds the behavior to the element. | |
| constructListener(source) | Constructs a function that will be invoked with the MediaQueryList context | |
| unbind(source) | Unbinds the behavior from the element. |