@microsoft/fast-element/context.js > ContextEvent
ContextEvent class
An event fired by a context requester to signal it desires a named context.
A provider should inspect the context property of the event to determine if it has a value that can satisfy the request, calling the callback with the requested value if so.
If the requested context event contains a truthy multiple value, then a provider can call the callback multiple times if the value is changed, if this is the case the provider should pass a dispose method to the callback which requesters can invoke to indicate they no longer wish to receive these updates.
Signature:
export declare class ContextEvent<T extends UnknownContext> extends Event
Extends: Event
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
| |||
|
|
T | ||
|
|
boolean | undefined |
(Optional) |