Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
domain
}) || _src.bridge.hasBridge(domain, domain)) {
return;
}
const bridgeUrl = this.component.getBridgeUrl();
if (!bridgeUrl) {
throw new Error(`Bridge needed to render ${context}`);
}
const bridgeDomain = (0, _src2.getDomainFromUrl)(bridgeUrl);
_src.bridge.linkUrl(win, domain);
return _src.bridge.openBridge((0, _src2.normalizeMockUrl)(bridgeUrl), bridgeDomain);
});
}
}).then(win => {
if (!_src.bridge || !_src.bridge.needsBridge({
win,
domain
}) || _src.bridge.hasBridge(domain, domain)) {
return;
}
const bridgeUrl = this.component.getBridgeUrl();
if (!bridgeUrl) {
throw new Error(`Bridge needed to render ${context}`);
}
const bridgeDomain = (0, _src2.getDomainFromUrl)(bridgeUrl);
_src.bridge.linkUrl(win, domain);
return _src.bridge.openBridge((0, _src2.normalizeMockUrl)(bridgeUrl), bridgeDomain);
});
}
}).then(win => {
if (!_src.bridge || !_src.bridge.needsBridge({
win,
domain
}) || _src.bridge.hasBridge(domain, domain)) {
return;
}
const bridgeUrl = this.component.getBridgeUrl();
if (!bridgeUrl) {
throw new Error(`Bridge needed to render ${context}`);
}
const bridgeDomain = (0, _src2.getDomainFromUrl)(bridgeUrl);
_src.bridge.linkUrl(win, domain);
function destroyAll() {
if (_src.bridge) {
_src.bridge.destroyBridges();
}
const results = [];
const global = (0, _lib.getGlobal)();
global.activeComponents = global.activeComponents || [];
while (global.activeComponents.length) {
results.push(global.activeComponents[0].destroy(new Error(`zoid desroyed all`), false));
}
return _src2.ZalgoPromise.all(results).then(_src4.noop);
}
function destroyAll() {
if (_src.bridge) {
_src.bridge.destroyBridges();
}
const results = [];
const global = (0, _lib.getGlobal)();
global.activeComponents = global.activeComponents || [];
while (global.activeComponents.length) {
results.push(global.activeComponents[0].destroy(new Error(`zoid desroyed all`), false));
}
return _src2.ZalgoPromise.all(results).then(_src4.noop);
}
if (!_src.bridge || !_src.bridge.needsBridge({
win,
domain
}) || _src.bridge.hasBridge(domain, domain)) {
return;
}
const bridgeUrl = this.component.getBridgeUrl();
if (!bridgeUrl) {
throw new Error(`Bridge needed to render ${context}`);
}
const bridgeDomain = (0, _src2.getDomainFromUrl)(bridgeUrl);
_src.bridge.linkUrl(win, domain);
return _src.bridge.openBridge((0, _src2.normalizeMockUrl)(bridgeUrl), bridgeDomain);
});
}