(target, htmlStr)
| 12917 | return null; |
| 12918 | } |
| 12919 | function tryPolicySetHTML(target, htmlStr){ |
| 12920 | if (!canPolicySetHTML) return false; |
| 12921 | const creator = ensureEscapeHTMLCreator(); |
| 12922 | if (!creator) return false; |
| 12923 | try { |
| 12924 | target.innerHTML = creator(htmlStr); |
| 12925 | return true; |
| 12926 | } catch (e) { |
| 12927 | canPolicySetHTML = false; |
| 12928 | return false; |
| 12929 | } |
| 12930 | } |
| 12931 | function setHTML(target, html){ |
| 12932 | if (!target) return; |
| 12933 | const htmlStr = html === null || html === undefined ? '' : String(html); |
no test coverage detected