I am looking to update the second select box based on first selectbox value change.
let event = new Event {'chosen:updated'};
document.getElementById('selectboxSecond').dispatchEvent(event);
but actual select box have new innerHTML i updated using javascript but the div contao created is not updating. without jQuery i wanna do. Can someone please help me what i am doing wrong .