How to use the belter/src.destroyElement function in belter

To help you get started, we’ve selected a few belter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paypal / paypal-smart-payment-buttons / test / client / mocks.js View on Github external
enableStandardCardFields: false,
        enableNativeCheckout:     false
    };

    window.Promise.try = (method) => {
        return window.Promise.resolve().then(method);
    };

    const buttonsContainer = document.querySelector('#buttons-container') || document.createElement('div');
    buttonsContainer.id = 'buttons-container';
    destroyElement(buttonsContainer);
    body.appendChild(buttonsContainer);

    const cardContainer = document.querySelector('#card-fields-container') || document.createElement('div');
    cardContainer.id = 'card-fields-container';
    destroyElement(cardContainer);
    body.appendChild(cardContainer);
}
github krakenjs / zoid / test / windows / child / index.js View on Github external
setTimeout(() => {
        window.close();
        if (window.frameElement) {
            destroyElement(window.frameElement);
        }
    }, 1);
    throw new Error(`No xprops found`);
github paypal / paypal-sdk-client / src / setup.js View on Github external
value:      () => {
            destroyers.forEach(destroy => destroy());
            destroyElement(getSDKScript());
            delete window[namespace];
        }
    });
github krakenjs / zoid / src / parent / drivers.js View on Github external
            this.clean.register(() => destroyElement(prerenderFrame));
github krakenjs / zoid / dist / module / component / parent / drivers.js View on Github external
setTimeout(function () {
            if (_this3.prerenderIframe) {
                destroyElement(_this3.prerenderIframe);
            }
        }, 1000);
    },
github paypal / paypal-checkout-components / src / zoid / buttons / container.jsx View on Github external
setTimeout(() => {
            destroyElement(prerenderFrame);
        }, 1000);
    });
github krakenjs / zoid / dist / module / component / parent / drivers.js View on Github external
_this2.clean.register('destroyPrerender', function () {
                destroyElement(prerenderIframe);
            });
github paypal / paypal-card-components / src / contingency-flow.js View on Github external
setTimeout(() => {
        destroyElement(prerenderFrame);
      }, 1);
    });