@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) • 530 B
JavaScript
import{B as s}from"../chunks/beam-errors-P-Lu07Ce.esm.js";function l(t,{timeout:i=1e4}={}){return new Promise((r,m)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const u=setTimeout(()=>{e||(o?.disconnect(),m(new s(`Timed out waiting for '${t}'`)))},i);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(c=>{e=c,r(c),n.disconnect(),clearTimeout(u)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
//# sourceMappingURL=wait-for-element.js.map