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

Function tryDirectSetHTML

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

Source from the content-addressed store, hash-verified

4879 }
4880 }
4881 function tryDirectSetHTML(target, htmlStr) {
4882 if (!canDirectSetHTML) return false;
4883 try {
4884 target.innerHTML = htmlStr;
4885 return true;
4886 } catch (e) {
4887 canDirectSetHTML = false;
4888 return false;
4889 }
4890 }
4891
4892 function ensureEscapeHTMLPolicy() {
4893 if (!canPolicySetHTML) return null;

Callers 1

setHTMLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected