diff options
author | Arun Isaac | 2017-08-06 22:54:07 +0530 |
---|---|---|
committer | Arun Isaac | 2017-08-06 22:54:07 +0530 |
commit | 689eb3352fd4630b350f7482597775e8c8a65d1b (patch) | |
tree | 194c6aac73394226bb0bbd50b16626a2782ad949 | |
parent | 768c7a78f5b6208caad13264110ce5a1a45c25df (diff) | |
download | youtube-noscript-shim-689eb3352fd4630b350f7482597775e8c8a65d1b.tar.gz youtube-noscript-shim-689eb3352fd4630b350f7482597775e8c8a65d1b.tar.lz youtube-noscript-shim-689eb3352fd4630b350f7482597775e8c8a65d1b.zip |
Do not assign to innerHTML.
* viewtube.js (createElement): Do not assign to innerHTML. Mozilla
considers this unsafe.
-rw-r--r-- | viewtube.js | 6 |
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; } |