How to use the cross-domain-utils/src.normalizeMockUrl function in cross-domain-utils

To help you get started, we’ve selected a few cross-domain-utils 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 / src / component / parent / index.js View on Github external
.then(query => {
                let url = normalizeMockUrl(this.component.getUrl(this.props));
                return extendUrl(url, { query: { ...query } });
            });
    }
github krakenjs / zoid / src / parent / index.js View on Github external
return propsToQuery({ ...this.component.props, ...this.component.builtinProps }, this.props).then(query => {
            return extendUrl(normalizeMockUrl(this.component.getUrl(this.props)), { query });
        });
    }
github krakenjs / post-robot / src / bridge / parent.js View on Github external
window.open = function windowOpenWrapper(url : string, name : string, options : string, last : mixed) : mixed {
        const win = windowOpen.call(this, normalizeMockUrl(url), name, options, last);
    
        if (!win) {
            return win;
        }
    
        linkWindow({ win, name, domain: url ? getDomainFromUrl(url) : null });
    
        return win;
    };
}
github krakenjs / zoid / src / parent / index.js View on Github external
}).then(win => {
                if (!bridge || !bridge.needsBridge({ win, domain }) || bridge.hasBridge(domain, domain)) {
                    return;
                }

                const bridgeUrl = this.component.getBridgeUrl();

                if (!bridgeUrl) {
                    throw new Error(`Bridge needed to render ${ context }`);
                }

                const bridgeDomain = getDomainFromUrl(bridgeUrl);
                bridge.linkUrl(win, domain);
                return bridge.openBridge(normalizeMockUrl(bridgeUrl), bridgeDomain);
            });
        }
github krakenjs / zoid / dist / module / component / parent / index.js View on Github external
return propsToQuery(_extends({}, this.component.props, this.component.builtinProps), this.props).then(function (query) {
            var url = normalizeMockUrl(_this5.component.getUrl(_this5.props));
            return extendUrl(url, { query: _extends({}, query) });
        });
    };