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

Function getLocationHref

packages/core/src/utils/browser.ts:135–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 * A safe form of location.href
134 */
135export function getLocationHref(): string {
136 try {
137 return WINDOW.document.location.href;
138 } catch {
139 return '';
140 }
141}
142
143/**
144 * Given a DOM element, traverses up the tree until it finds the first ancestor node

Callers 7

getHttpRequestDataFunction · 0.90
afterAllSetupFunction · 0.90
shouldAttachHeadersFunction · 0.90
sendFeedbackFunction · 0.90
handleHydrationErrorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected