const e = new Event("change"); const element = document.querySelector('#test') element.dispatchEvent(e);