Interface PointerActivity

Represents a pointer activity.

An object that represents a sequence of PointerEvents with the same pointerId from after pointerenter to ponterleave.

interface PointerActivity {
    beforeTrace: null | Trace;
    device: PointerDevice;
    duration: number;
    endTrace: null | Trace;
    inProgress: boolean;
    isPrimary: boolean;
    movement: {
        angle: number;
        length: number;
        x: number;
        y: number;
    };
    pointerId: number;
    result: Promise<Result>;
    startTime: number;
    startTrace: null | Trace;
    target: null | Element;
    track: number;
    [asyncIterator](): AsyncGenerator<Trace, void, void>;
}

Properties

beforeTrace: null | Trace

Indicates the PointerActivity.Trace record before the startTrace record. Set if the pointer is pointerenter from outside the boundaries of target element. Otherwise, null.

This value is never changed.

Indicates the PointerDevice.

This value is never changed.

duration: number

Indicates the elapsed time from startTrace record to latest PointerActivity.Trace record.

This value is 0 when the instance is created; it keeps increasing while tracking the pointer. When the instance inProgress is set to false, this value is not changed thereafter.

endTrace: null | Trace

Indicates the end PointerActivity.Trace record of the PointerActivity.

This value is null when the instance is created. When the instance inProgress is set to false, the PointerActivity.Trace is set to this value and this value is not changed thereafter.

inProgress: boolean

Indicates whether that no endTrace record has been recorded.

The value is true when the instance is created. Never changed after being changed to false.

isPrimary: boolean

Indicates the isPrimary property of the PointerEvent.

This value is never changed.

movement: {
    angle: number;
    length: number;
    x: number;
    y: number;
}

Type declaration

  • angle: number
  • length: number
  • x: number
  • y: number
pointerId: number

Indicates the pointerId property of the PointerEvent.

This value is never changed.

result: Promise<Result>

The Promise that resolves to a PointerActivity.Result.

startTime: number

Indicates the timeStamp property of this startTrace record.

This value is never changed.

startTrace: null | Trace

Indicates the start PointerActivity.Trace record of the PointerActivity.

This value is never changed.

target: null | Element

Indicates the monitoring target element of the PointerActivityObserver.

This value is never changed.

track: number

Methods

  • Returns the AsyncGenerator of PointerActivity.Trace records.

    Returns AsyncGenerator<Trace, void, void>