Closed mathias-weitz-cross-solutions closed 4 years ago
Following listeners do always create Elements (Childs for Navigation,..) even if there is no need for those. Sometimes their inclusion may have even side-effects, and you don't want these listeners to be called at all.
It should be simple to check in the listener, if an ajax request is processed and skip its action.
Also, it is quite simple to implement a check for a specific event parameter to disable injection. This parameter can then be set on actions which does not require the injections.
That's true for both listeners.
The subnavigationlistener is always invoked even if there is no subnavigation like JSON-Responses. There should be a possibility to call the subnavigation only if needed.