fluid.event.identifyListener(listener) Section |
---|
Column |
---|
| Returns the unique identifier of the given listener. If the listener has none, one will be added and returned. Code Block |
---|
| javascript |
---|
| javascript |
---|
bgColor | white |
---|
borderStyle | nonejavascript |
---|
|
fluid.event.identifyListener(listener);
|
File name: Fluid.js Parameters Span |
---|
| listener
| (Function) description |
|
Return Value Span |
---|
| integer | The unique identifier allocated to this listener. |
|
|
| NotesThe guid of a listener can be used... Example Code Block |
---|
|
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. |