File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/svelte/src/internal/client/dom Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 11/** @import { TrustedTypePolicy } from 'trusted-types' */
22
3- /** @type {Pick<TrustedTypePolicy, 'createHTML'> | undefined } */
4- let policy ;
5-
6- if ( globalThis ?. window ?. trustedTypes ) {
7- policy = globalThis . window . trustedTypes . createPolicy ( 'svelte-trusted-html' , {
3+ const policy = /* @__PURE__ */ globalThis ?. window ?. trustedTypes ?. createPolicy (
4+ 'svelte-trusted-html' ,
5+ {
86 /** @param {string } html */
97 createHTML : ( html ) => {
108 return html ;
119 }
12- } ) ;
13- }
10+ }
11+ ) ;
1412
1513/** @param {string } html */
1614function create_trusted_html ( html ) {
17- return /** @type {string } */ ( policy ?. createHTML ( html ) ?? html ) ;
15+ return /** @type {string } */ ( policy ?. createHTML ( html ) ?? html ) ;
1816}
1917
2018/** @param {string } html */
You can’t perform that action at this time.
0 commit comments