1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-10 11:59:58 +00:00

Fixed problem with Element.ELEMENT_NODE undefined on Safari

This commit is contained in:
Jermolene 2014-01-04 15:15:12 +00:00
parent 504f353844
commit e0f428b9b2

View File

@ -18,7 +18,7 @@ Set style properties of an element
styles: ordered array of {name: value} pairs
*/
exports.setStyle = function(element,styles) {
if(element.nodeType === Element.ELEMENT_NODE) {
if(element.nodeType === 1) { // Element.ELEMENT_NODE
for(var t=0; t<styles.length; t++) {
for(var styleName in styles[t]) {
element.style[$tw.utils.convertStyleNameToPropertyName(styleName)] = styles[t][styleName];