MCPcopy Index your code
hub / github.com/bugy/script-server / createTemplateElement

Function createTemplateElement

web-src/src/common/utils/common.js:257–268  ·  view source on GitHub ↗
(templateName)

Source from the content-addressed store, hash-verified

255}
256
257export function createTemplateElement(templateName) {
258 const templateContent = document.getElementById(templateName).innerHTML.trim();
259
260 const template = document.createElement('template');
261 template.innerHTML = templateContent;
262 const element = template.content.childNodes[0];
263
264 const clazz = templateName.replace(/-template$/g, '');
265 addClass(element, clazz);
266
267 return element;
268}
269
270export function readQueryParameters() {
271 var argString = window.location.search;

Callers 2

setupCredentialsFunction · 0.90
setupOAuthFunction · 0.90

Calls 1

addClassFunction · 0.85

Tested by

no test coverage detected