Would like to simulate clicking the close button of the features widget.
I tried this but it is not working. I suspect it is because of the shadow root.
const closeBtn = document.querySelector(".esri-features__close-button");
if (closeBtn) { closeBtn.click(); } Ideas? Thanks.