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)
| 70 | @private |
| 71 | */ |
| 72 | function createNode(name, attrs) { |
| 73 | var node = doc.createElement(name), attr; |
| 74 | |
| 75 | for (attr in attrs) { |
| 76 | if (attrs.hasOwnProperty(attr)) { |
| 77 | node.setAttribute(attr, attrs[attr]); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | return node; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | Called when the current pending resource of the specified type has finished |