Layers are processed from the highest z-index to the lowest. Within one
layer, every active element receives the event (broadcast); the first
element that handles it marks the layer as consumed, but processing still
continues to the remaining elements so multiple handlers can run.
If no element in the layer handled the event, the event bubbles to the
next lower layer. When no layer is left, the processor returns false
and the event continues toward the screen/page stages.
Create a processor for the layer stage.
Layers are processed from the highest z-index to the lowest. Within one layer, every active element receives the event (broadcast); the first element that handles it marks the layer as consumed, but processing still continues to the remaining elements so multiple handlers can run.
If no element in the layer handled the event, the event bubbles to the next lower layer. When no layer is left, the processor returns
falseand the event continues toward the screen/page stages.