@beamimpact/web-sdk
Version:
The Beam SDK enables brands to connect with their customers over shared values, not transactional discounts, to build stronger loyalty. Our integration achieves this by allowing customers to (a) choose a nonprofit where the brand will donate part of their
3 lines (2 loc) • 534 B
JavaScript
import{B as s}from"../chunks/beam-errors-Ci0d3926.esm.js";function l(t,{timeout:c=1e4}={}){return new Promise((r,i)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const m=setTimeout(()=>{e||(o?.disconnect(),i(new s(`Timed out waiting for '${t}'`)))},c);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(u=>{e=u,r(u),n.disconnect(),clearTimeout(m)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
//# sourceMappingURL=wait-for-element.esm.js.map