ViewStack: replacing selectedChildId by selectedChild based on document.querySelector