How to get a SmartSelect in a Popup with app.smartSelect.get?

I deployed on my website the example below (check error in console): Test SmartSelect in Popup

I cannot get the smartSelect with those attempts:

  • app.smartSelect.get(testSmartSelect);
  • app.smartSelect.get(“#testSmartSelect”);

HTML:
< div id=“testPopup” class=“popup”>
< div id=“popupTitle” class=“block-title”>Popup Title< /div>
< div id=“btnSmartSelect” class=“block”>
< a id=“testSmartSelect” class=“item-link smart-select smart-select-init” data-open-in=“popup” data-searchbar=“true” data-searchbar-placeholder=“Search…”>< /a>
< /div>
<button class=“button color-gray” onclick=“closeTestPopup()” @click=“${() => closeTestPopup()}”>Close< /button>
< /div>

JS:
function openTestPopup() {
app.popup.open(testPopup, true);

testSmartSelect.innerHTML = '<select multiple id="testSelect"><option value="a">a</option><option value="b">b</option></select><button class="button button-outline">Open SmartSelect</button>';

let smartSelect = app.smartSelect.get(testSmartSelect);
smartSelect.on("close", function () {
    alert("callback close SmartSelect");
});

}

function closeTestPopup() {
app.popup.close(testPopup, true);
}

Thanks for your help!