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

Function tryPolicySetHTML

Picviewer CE+/Picviewer CE+.user.js:12919–12930  ·  view source on GitHub ↗
(target, htmlStr)

Source from the content-addressed store, hash-verified

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);

Callers 1

setHTMLFunction · 0.70

Calls 1

ensureEscapeHTMLCreatorFunction · 0.70

Tested by

no test coverage detected