Class: Context¶
A Context object groups a binding (any value or object composed of data) and an optional UI element. It also holds on to some miscellaneous data that gets used in rules via a ClientAPI object. A context is the result of every target path segment evaluation. A ClientAPI object provides an interface to a Context that can be used when evaluating rules.
Hierarchy¶
- Context
Implements¶
Summary¶
Constructors¶
Properties¶
Class Properties¶
Inherited Properties¶
None in the parent class(es).
Accessors¶
Class Accessors¶
Inherited Accessors¶
None in the parent class(es).
Methods¶
Class Methods¶
Inherited Methods¶
None in the parent class(es).
Constructors¶
constructor¶
+ new Context(binding?
: any, element?
: any): Context
Parameters:
Name | Type |
---|---|
binding? |
any |
element? |
any |
Returns: Context
Properties¶
Optional
binding¶
• binding? : any
Implementation of IContext.binding
clientAPIProps¶
• clientAPIProps: IClientAPIProps
Implementation of IContext.clientAPIProps
Optional
element¶
• element? : any
Implementation of IContext.element
Accessors¶
clientAPI¶
• getter
Get the clientAPI object
Returns: IClientAPI
clientData¶
• getter
Get the client data object. This starts out as a plain JavaScript object, and can be modified to hold application state. Can only be accessed for IClientAPI instances associated with a UI element, because that guarantees that the data will last for the lifetime of that element.
Returns: IClientData
readLink¶
• getter
Get this context's binding's associated readLink if any. Otherwise undefined.
Returns: string
Methods¶
resetClientAPIProps¶
▸ resetClientAPIProps(): void
Implementation of IContext
Delete all relevant properties from the embedded clientAPIProps object
Returns: void
Static
fromPage¶
▸ fromPage(source?
: ExecuteSource): IContext
Get the context of the current rendered page
Parameters:
Name | Type |
---|---|
source? |
ExecuteSource |
Returns: IContext