MCPcopy Create free account
hub / github.com/angular/components / trustedHTMLFromString

Function trustedHTMLFromString

src/cdk/private/trusted-types.ts:75–77  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

73 * element.innerHTML.
74 */
75export function trustedHTMLFromString(html: string): TrustedHTML {
76 return getPolicy()?.createHTML(html) || (html as unknown as TrustedHTML);
77}

Callers 6

_toSvgElementMethod · 0.90
_fetchIconMethod · 0.90
_setInnerHtmlFunction · 0.90

Calls 2

getPolicyFunction · 0.85
createHTMLMethod · 0.80

Tested by

no test coverage detected