This is a prerelease version of FAST (3.0.0-rc.1).

@microsoft/fast-element > DefaultExecutionContext

DefaultExecutionContext class

The default execution context for template views.

Signature:

export declare class DefaultExecutionContext<TParent> implements ExecutionContext<TParent>

Implements: ExecutionContext<TParent>

Properties

Property

Modifiers

Type

Description

event

readonly

Event

The current event within an event handler.

index

number

The index of the current item within a repeat context.

isEven

readonly

boolean

Indicates whether the current item within a repeat context has an even index.

isFirst

readonly

boolean

Indicates whether the current item within a repeat context is the first item in the collection.

isInMiddle

readonly

boolean

Indicates whether the current item within a repeat context is somewhere in the middle of the collection.

isLast

readonly

boolean

Indicates whether the current item within a repeat context is the last item in the collection.

isOdd

readonly

boolean

Indicates whether the current item within a repeat context has an odd index.

length

number

The length of the current collection within a repeat context.

parent

readonly

TParent

The parent data source within a nested context.

parentContext

readonly

ExecutionContext<TParent>

The parent execution context when in nested context scenarios.

Methods

Method

Modifiers

Description

eventDetail()

Returns the typed event detail of a custom event.

eventTarget()

Returns the typed event target of the event.