FLUID-4564: Rationalise system for registering event listeners, providing consistency with lifecycle listeners and namespace semantics

Metadata

Source
FLUID-4564
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2011-11-30T02:35:05.677-0500
Updated
2024-07-22T09:40:28.415-0400
Versions
N/A
Fixed Versions
  1. 1.5
Component
  1. Framework

Description

Essentially since inception, the Fluid events system has operated a semantic for registering listeners that is now judged incorrect. Supplying a listener for an event which already has a listener registered in the defaults of the component will displace the listener, rather than the more consistent behaviour of registering in addition to it. This behaviour was originally implemented before namespacing for Fluid events was implemented, and was the only way to "displace" a listener which appeared in the component defaults.
The more consistent behaviour would be to agree with the behaviour of "addListener" if supplied the extra listener. This was actually the implementation that was chosen for "lifecycle listeners", but to avoid disturbing users of the framework in the middle of a release cycle, this was implemented using a completely independent options merging scheme.
This work is now blocking FLUID-4541 since the lifecycle listener implementation is proving a performance bottleneck, impeding implementation of caching for FLUID-4563.

Comments