EZP-23147: Moved the DOM state handling to a dedicated app plugin