summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--viewtube.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/viewtube.js b/viewtube.js
index dfad54f..8ed1076 100644
--- a/viewtube.js
+++ b/viewtube.js
@@ -49,10 +49,8 @@
function createElement (type, attributes, parent) {
var element = document.createElement(type);
- for (var key in attributes) {
- if (key == 'innerHTML') element.innerHTML = attributes[key];
- else element.setAttribute(key, attributes[key]);
- }
+ for (var key in attributes)
+ element.setAttribute(key, attributes[key]);
if (parent) parent.appendChild(element);
return element;
}