MCPcopy
hub / github.com/ampproject/amphtml / getWinOrigin

Function getWinOrigin

src/url.js:57–59  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

55 * @return {string} origin
56 */
57export function getWinOrigin(win) {
58 return win.origin || parseUrlDeprecated(win.location.href).origin;
59}
60
61/**
62 * Returns a Location-like object for the given URL. If it is relative,

Callers 8

test-url.jsFile · 0.90
setupAMPCorsFunction · 0.90
delegateAuthToViewer_Method · 0.90
verifyAuthToken_Method · 0.90

Calls 1

parseUrlDeprecatedFunction · 0.85

Tested by

no test coverage detected