MCPcopy Index your code
hub / github.com/angular/angular / isDOMParserAvailable

Function isDOMParserAvailable

packages/core/src/sanitization/inert_body.ts:87–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 * @suppress {uselessCode}
86 */
87export function isDOMParserAvailable() {
88 try {
89 return !!new window.DOMParser().parseFromString(
90 trustedHTMLFromString('') as string,
91 'text/html',
92 );
93 } catch {
94 return false;
95 }
96}

Callers 2

getInertBodyHelperFunction · 0.85

Calls 1

trustedHTMLFromStringFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…