MCPcopy
hub / github.com/hoothin/UserScripts / setHTML

Function setHTML

Picviewer CE+/Picviewer CE+.user.js:12931–12940  ·  view source on GitHub ↗
(target, html)

Source from the content-addressed store, hash-verified

12929 }
12930 }
12931 function setHTML(target, html){
12932 if (!target) return;
12933 const htmlStr = html === null || html === undefined ? '' : String(html);
12934 if (tryDirectSetHTML(target, htmlStr) || tryPolicySetHTML(target, htmlStr)) return;
12935 const fragment = createHTML(htmlStr);
12936 while (target.firstChild) {
12937 target.removeChild(target.firstChild);
12938 }
12939 target.appendChild(fragment);
12940 }
12941 async function init(topObject,window,document,arrayFn,envir,storage,unsafeWindow){
12942 await createPolicy();
12943 // 默认设置,请到设置界面修改

Callers 3

initFunction · 0.70
createSpanMarkFunction · 0.70
setSearchStateFunction · 0.70

Calls 3

tryDirectSetHTMLFunction · 0.70
tryPolicySetHTMLFunction · 0.70
createHTMLFunction · 0.70

Tested by

no test coverage detected