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)
| 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 |