(target, htmlStr)
| 4907 | } |
| 4908 | |
| 4909 | function tryPolicySetHTML(target, htmlStr) { |
| 4910 | if (!canPolicySetHTML) return false; |
| 4911 | ensureEscapeHTMLPolicy(); |
| 4912 | if (!escapeHTMLCreator) return false; |
| 4913 | try { |
| 4914 | target.innerHTML = escapeHTMLCreator(htmlStr); |
| 4915 | return true; |
| 4916 | } catch (e) { |
| 4917 | canPolicySetHTML = false; |
| 4918 | return false; |
| 4919 | } |
| 4920 | } |
| 4921 | |
| 4922 | function setHTML(target, html, doc) { |
| 4923 | if (!target) return; |
no test coverage detected