MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / createElement

Function createElement

html/js/base.js:72–90  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

70
71
72function createElement(item) {
73 //console.log(item);
74 var element = document.createElement(item["_element"]);
75 if (item.hasOwnProperty("_text")) {
76 //element.innerHTML = "<p>" + item["_text"] + "</p>";
77 element.innerHTML = item["_text"];
78 }
79
80 var keys = getObjKeys(item);
81 for (var i = 0; i < keys.length; i++) {
82 if (keys[i].charAt(0) != "_") {
83 //console.log(keys[i], item[keys[i]]);
84 element.setAttribute(keys[i], item[keys[i]]);
85 }
86 }
87
88 //console.log(element);
89 return element;
90}
91
92function modifyOption(id, options, values) {
93 var select = document.getElementById(id);

Callers 15

createConfigurationFunction · 0.85
writeLogInDivFunction · 0.85
showLogFunction · 0.85
createMenuFunction · 0.85
toggleMenuFunction · 0.85
createMenuItemFunction · 0.85
openSubMenuFunction · 0.85
showMyStreamsFunction · 0.85
showActiveStreamsFunction · 0.85
openMappingEditorFunction · 0.85
createMappingTableFunction · 0.85
createNewElementFunction · 0.85

Calls 1

getObjKeysFunction · 0.70

Tested by

no test coverage detected