mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-29 11:30:28 +00:00
Fixed problem with Element.ELEMENT_NODE undefined on Safari
This commit is contained in:
parent
504f353844
commit
e0f428b9b2
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user