@aurigma/design-editor-iframe
Version:
Using this module you can embed Design Editor (a part of Customer's Canvas) to your page through the IFrame API.
20 lines • 590 B
JavaScript
/**
* @internal
*/
export function waitElementVisible(element) {
var isDisplayNone = function () { return element.offsetParent == null; };
return new Promise(function (resolve) {
if (!isDisplayNone()) {
resolve();
return;
}
var checkDisplayInterval = setInterval(function () {
if (!isDisplayNone()) {
clearInterval(checkDisplayInterval);
resolve();
}
}, 400);
});
}
export default waitElementVisible;
//# sourceMappingURL=waitElementVisible.js.map