Interface FederatedEventTarget

Describes the shape for a PIXI.FederatedEvent's' eventTarget.

Memberof

PIXI

interface FederatedEventTarget {
    _internalEventMode: EventMode;
    _internalInteractive: boolean;
    children?: readonly FederatedEventTarget[];
    cursor: string;
    eventMode: EventMode;
    hitArea: null | IHitArea;
    interactive: boolean;
    interactiveChildren: boolean;
    isInteractive: (() => boolean);
    onclick: null | FederatedEventHandler<FederatedPointerEvent>;
    onglobalmousemove: null | FederatedEventHandler<FederatedPointerEvent>;
    onglobalpointermove: null | FederatedEventHandler<FederatedPointerEvent>;
    onglobaltouchmove: null | FederatedEventHandler<FederatedPointerEvent>;
    onmousedown: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseenter: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseleave: null | FederatedEventHandler<FederatedPointerEvent>;
    onmousemove: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseout: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseover: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseup: null | FederatedEventHandler<FederatedPointerEvent>;
    onmouseupoutside: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointercancel: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerdown: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerenter: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerleave: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointermove: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerout: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerover: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointertap: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerup: null | FederatedEventHandler<FederatedPointerEvent>;
    onpointerupoutside: null | FederatedEventHandler<FederatedPointerEvent>;
    onrightclick: null | FederatedEventHandler<FederatedPointerEvent>;
    onrightdown: null | FederatedEventHandler<FederatedPointerEvent>;
    onrightup: null | FederatedEventHandler<FederatedPointerEvent>;
    onrightupoutside: null | FederatedEventHandler<FederatedPointerEvent>;
    ontap: null | FederatedEventHandler<FederatedPointerEvent>;
    ontouchcancel: null | FederatedEventHandler<FederatedPointerEvent>;
    ontouchend: null | FederatedEventHandler<FederatedPointerEvent>;
    ontouchendoutside: null | FederatedEventHandler<FederatedPointerEvent>;
    ontouchmove: null | FederatedEventHandler<FederatedPointerEvent>;
    ontouchstart: null | FederatedEventHandler<FederatedPointerEvent>;
    onwheel: null | FederatedEventHandler<FederatedWheelEvent>;
    parent?: FederatedEventTarget;
    addEventListener(type, callback, options?): void;
    addEventListener(type, callback, options?): void;
    addListener<T>(event, fn, context?): this;
    dispatchEvent(event): boolean;
    dispatchEvent(event): boolean;
    emit<T>(event, ...args): boolean;
    eventNames(): (string | symbol)[];
    listenerCount(event): number;
    listeners<T>(event): ((...args) => void)[];
    off<T>(event, fn?, context?, once?): this;
    on<T>(event, fn, context?): this;
    once<T>(event, fn, context?): this;
    removeAllListeners(event?): this;
    removeEventListener(type, callback, options?): void;
    removeEventListener(type, callback, options?): void;
    removeListener<T>(event, fn?, context?, once?): this;
}

Hierarchy (view full)

Properties

_internalEventMode: EventMode
_internalInteractive: boolean
children?: readonly FederatedEventTarget[]

The children of this event target.

cursor: string

The cursor preferred when the mouse pointer is hovering over.

eventMode: EventMode

The mode of interaction for this object

hitArea: null | IHitArea

The hit-area specifies the area for which pointer events should be captured by this event target.

interactive: boolean

Whether this event target should fire UI events.

interactiveChildren: boolean

Whether this event target has any children that need UI events. This can be used optimize event propagation.

isInteractive: (() => boolean)

Returns true if the DisplayObject has interactive 'static' or 'dynamic'

Type declaration

    • (): boolean
    • Returns boolean

Handler for 'click' event

onglobalmousemove: null | FederatedEventHandler<FederatedPointerEvent>

Handler for 'globalmousemove' event

onglobalpointermove: null | FederatedEventHandler<FederatedPointerEvent>

Handler for 'globalpointermove' event

onglobaltouchmove: null | FederatedEventHandler<FederatedPointerEvent>

Handler for 'globaltouchmove' event

Handler for 'mousedown' event

Handler for 'mouseenter' event

Handler for 'mouseleave' event

Handler for 'mousemove' event

Handler for 'mouseout' event

Handler for 'mouseover' event

Handler for 'mouseup' event

Handler for 'mouseupoutside' event

Handler for 'pointercancel' event

Handler for 'pointerdown' event

Handler for 'pointerenter' event

Handler for 'pointerleave' event

Handler for 'pointermove' event

Handler for 'pointerout' event

Handler for 'pointerover' event

Handler for 'pointertap' event

Handler for 'pointerup' event

onpointerupoutside: null | FederatedEventHandler<FederatedPointerEvent>

Handler for 'pointerupoutside' event

Handler for 'rightclick' event

Handler for 'rightdown' event

Handler for 'rightup' event

Handler for 'rightupoutside' event

Handler for 'tap' event

Handler for 'touchcancel' event

Handler for 'touchend' event

ontouchendoutside: null | FederatedEventHandler<FederatedPointerEvent>

Handler for 'touchendoutside' event

Handler for 'touchmove' event

Handler for 'touchstart' event

Handler for 'wheel' event

The parent of this event target.

Methods

  • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

    The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

    When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

    When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

    When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

    If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

    The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

    MDN Reference

    Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

    The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

    When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

    When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

    When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

    If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

    The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

    MDN Reference

    Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    • event: Event

    Returns boolean

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    • event: Event

    Returns boolean

  • Calls each of the listeners registered for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Rest ...args: any[]

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (string | symbol)[]

  • Return the number of listeners listening to a given event.

    Parameters

    • event: string | symbol

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

  • Add a listener for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns this

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: string | symbol

    Returns this

  • Removes the event listener in target's event listener list with the same type, callback, and options.

    MDN Reference

    Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Removes the event listener in target's event listener list with the same type, callback, and options.

    MDN Reference

    Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Remove the listeners of a given event.

    Type Parameters

    • T extends string | symbol

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns this

Generated using TypeDoc