MCPcopy Index your code
hub / github.com/hoothin/UserScripts / tryPolicySetHTML

Function tryPolicySetHTML

Pagetual/pagetual.user.js:4909–4920  ·  view source on GitHub ↗
(target, htmlStr)

Source from the content-addressed store, hash-verified

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;

Callers 1

setHTMLFunction · 0.70

Calls 1

ensureEscapeHTMLPolicyFunction · 0.85

Tested by

no test coverage detected