MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getFullURL

Function getFullURL

packages/browser/src/tracing/utils.ts:13–22  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

11 * Gets the full URL from a given URL string.
12 */
13export function getFullURL(url: string): string | undefined {
14 try {
15 // By adding a base URL to new URL(), this will also work for relative urls
16 // If `url` is a full URL, the base URL is ignored anyhow
17 const parsed = new URL(url, WINDOW.location.origin);
18 return parsed.href;
19 } catch {
20 return undefined;
21 }
22}
23
24/**
25 * Checks if the entry is a PerformanceResourceTiming.

Callers 2

xhrCallbackFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected