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