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

Function supportsDOMError

packages/core/src/utils/supports.ts:30–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 * @returns Answer to the given question.
29 */
30export function supportsDOMError(): boolean {
31 try {
32 // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
33 // 1 argument required, but only 0 present.
34 // @ts-expect-error It really needs 1 argument, not 0.
35 new DOMError('');
36 return true;
37 } catch {
38 return false;
39 }
40}
41
42/**
43 * Tells whether current environment supports DOMException objects

Callers 1

is.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected