How to use the post-robot/src.bridge function in post-robot

To help you get started, we’ve selected a few post-robot 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 krakenjs / zoid / dist / module / parent / index.js View on Github external
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);
      });
    }
github krakenjs / zoid / dist / module / parent / index.js View on Github external
}).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);
      });
    }
github krakenjs / zoid / dist / module / parent / index.js View on Github external
}).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);
github krakenjs / zoid / dist / module / component / component.js View on Github external
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);
}
github krakenjs / zoid / dist / module / component / component.js View on Github external
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);
}
github krakenjs / zoid / dist / module / parent / index.js View on Github external
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);
      });
    }