MCPcopy
hub / github.com/liabru/jquery-match-height / createDom

Function createDom

test/page/lib/jasmine-2.3.4/jasmine-html.js:310–334  ·  view source on GitHub ↗
(type, attrs, childrenVarArgs)

Source from the content-addressed store, hash-verified

308 }
309
310 function createDom(type, attrs, childrenVarArgs) {
311 var el = createElement(type);
312
313 for (var i = 2; i < arguments.length; i++) {
314 var child = arguments[i];
315
316 if (typeof child === 'string') {
317 el.appendChild(createTextNode(child));
318 } else {
319 if (child) {
320 el.appendChild(child);
321 }
322 }
323 }
324
325 for (var attr in attrs) {
326 if (attr == 'className') {
327 el[attr] = attrs[attr];
328 } else {
329 el.setAttribute(attr, attrs[attr]);
330 }
331 }
332
333 return el;
334 }
335
336 function pluralize(singular, count) {
337 var word = (count == 1 ? singular : singular + 's');

Callers 2

HtmlReporterFunction · 0.85
summaryListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected