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

Function tryDirectSetHTML

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

Source from the content-addressed store, hash-verified

12898 return escapeHTMLPolicy?escapeHTMLPolicy.createScript(html):html;
12899 }
12900 function tryDirectSetHTML(target, htmlStr){
12901 if (!canDirectSetHTML) return false;
12902 try {
12903 target.innerHTML = htmlStr;
12904 return true;
12905 } catch (e) {
12906 canDirectSetHTML = false;
12907 return false;
12908 }
12909 }
12910 function ensureEscapeHTMLCreator(){
12911 if (!canPolicySetHTML) return null;
12912 if (escapeHTMLCreator) return escapeHTMLCreator;

Callers 1

setHTMLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected