MCPcopy Index your code
hub / github.com/NUKnightLab/TimelineJS3 / createNode

Method createNode

src/js/core/Load.js:66–77  ·  view source on GitHub ↗

Creates and returns an HTML element with the specified name and attributes. @method createNode @param {String} name element name @param {Object} attrs name/value mapping of element attributes @return {HTMLElement} @private

(name, attrs)

Source from the content-addressed store, hash-verified

64 @private
65 */
66 createNode(name, attrs) {
67 var node = this.doc.createElement(name),
68 attr;
69
70 for (attr in attrs) {
71 if (attrs.hasOwnProperty(attr)) {
72 node.setAttribute(attr, attrs[attr]);
73 }
74 }
75
76 return node;
77 }
78
79 /**
80 Called when the current pending resource of the specified type has finished

Callers 1

loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected