MCPcopy Create free account
hub / github.com/UI5/webcomponents / appendAttributes

Function appendAttributes

packages/main/test/pages/diffable-html.js:2088–2108  ·  view source on GitHub ↗
(attributes, tagName)

Source from the content-addressed store, hash-verified

2086 };
2087
2088 var appendAttributes = function (attributes, tagName) {
2089 var names = Object.keys(attributes);
2090
2091 if (names.length === 1) {
2092 appendAttribute(names[0], attributes[names[0]]);
2093 }
2094
2095 if (names.length <= 1) {
2096 return;
2097 }
2098
2099 var firstAttribute = true;
2100 for (var name in attributes) {
2101 if (firstAttribute === true) {
2102 firstAttribute = false;
2103 appendAttribute(name, attributes[name]);
2104 } else {
2105 appendAttributeOnNewLine(name, attributes[name], tagName);
2106 }
2107 }
2108 };
2109
2110 var appendClosingTag = function (attributes, closeWith) {
2111 if (Object.keys(attributes).length <= 1) {

Callers 1

formatFunction · 0.85

Calls 2

appendAttributeFunction · 0.85
appendAttributeOnNewLineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…