MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / copyText

Function copyText

docs/source/_static/config_selector.js:69–82  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

67 }
68
69 async function copyText(text) {
70 if (navigator.clipboard && navigator.clipboard.writeText) {
71 await navigator.clipboard.writeText(text);
72 return;
73 }
74 const ta = el("textarea", { "aria-hidden": "true" });
75 ta.value = text;
76 ta.style.position = "fixed";
77 ta.style.left = "-9999px";
78 document.body.appendChild(ta);
79 ta.select();
80 document.execCommand("copy");
81 document.body.removeChild(ta);
82 }
83
84 function escapeHtml(s) {
85 return String(s)

Callers 1

initOneFunction · 0.85

Calls 2

elFunction · 0.85
selectMethod · 0.80

Tested by

no test coverage detected