fluid.event.identifyListener(listener)

Returns the unique identifier of the given listener. If the listener has none, one will be added and returned.

fluid.event.identifyListener(listener);

File name: Fluid.js

Parameters

listener

(Function) description

Return Value

integer

The unique identifier allocated to this listener.

See Also


Notes

The guid of a listener can be used...

Example

fireSpec.guids[fluid.event.identifyListener(listener)] = record;
    ...

var guid = fluid.event.identifyListener(listener);
if (fireSpec.guids[guid]) {
    var rec = fireSpec.guids[guid];
    ...
}

In this example, the identifier of the listener is used to register a record of information about the listener. Later, the guid of a listener is used to check whether or not a record exists for the listener before action is taken using it.