Class EventManager

Index

Methods

Methods

public static addListener(el?: any, eventName?: string, handler?: any, scope?: any, options?: any)

[Method] Appends an event handler to an element

Parameters

  • el?: any optional

    String/HTMLElement The HTML element or id to assign the event handler to.

  • eventName?: string optional

    String The name of the event to listen for.

  • handler?: any optional

    Function The handler function the event invokes. This function is passed the following parameters:

  • scope?: any optional

    Object The scope (this reference) in which the handler function is executed. Defaults to the Element.

  • options?: any optional

    Object An object containing handler configuration properties. This may contain any of the following properties:

public static on(el?: any, eventName?: string, handler?: any, scope?: any, options?: any)

[Method] Appends an event handler to an element

Parameters

  • el?: any optional

    String/HTMLElement The html element or id to assign the event handler to.

  • eventName?: string optional

    String The name of the event to listen for.

  • handler?: any optional

    Function The handler function the event invokes.

  • scope?: any optional

    Object (this reference) in which the handler function executes. Defaults to the Element.

  • options?: any optional

    Object An object containing standard addListener options

public static onDocumentReady()

[Method] Adds a listener to be notified when the document is ready before onload and before images are loaded

public static onWindowResize(fn?: any, scope?: any, options?: boolean)

[Method] Adds a listener to be notified when the browser window is resized and provides resize event buffering 50 millisecond

Parameters

  • fn?: any optional

    Function The handler function the window resize event invokes.

  • scope?: any optional

    Object The scope (this reference) in which the handler function executes. Defaults to the browser window.

  • options?: boolean optional

    Boolean Options object as passed to Ext.Element.addListener

public static removeAll(el?: any)

[Method] Removes all event handers from an element

Parameters

  • el?: any optional

    String/HTMLElement The id or html element from which to remove all event handlers.

public static removeListener(el?: any, eventName?: string, fn?: any, scope?: any)

[Method] Removes an event handler from an element

Parameters

  • el?: any optional

    String/HTMLElement The id or html element from which to remove the listener.

  • eventName?: string optional

    String The name of the event.

  • fn?: any optional

    Function The handler function to remove. This must be a reference to the function passed into the addListener call.

  • scope?: any optional

    Object If a scope (this reference) was specified when the listener was added, then this must refer to the same object.

public static un(el?: any, eventName?: string, fn?: any, scope?: any)

[Method] Removes an event handler from an element

Parameters

  • el?: any optional

    String/HTMLElement The id or html element from which to remove the listener.

  • eventName?: string optional

    String The name of the event.

  • fn?: any optional

    Function The handler function to remove. This must be a reference to the function passed into the on call.

  • scope?: any optional

    Object If a scope (this reference) was specified when the listener was added, then this must refer to the same object.