Skip to content

Commit

Permalink
Merge pull request #532 from lpyt/patch-1
Browse files Browse the repository at this point in the history
fixed ie8 not support
  • Loading branch information
troolee committed Oct 3, 2016
2 parents 28ed6fa + bd8bbff commit 016c161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
style.appendChild(document.createTextNode(''));
}
document.getElementsByTagName('head')[0].appendChild(style);
return style.sheet;
return style.sheet || style.styleSheet;
},

removeStylesheet: function(id) {
Expand All @@ -71,7 +71,7 @@
insertCSSRule: function(sheet, selector, rules, index) {
if (typeof sheet.insertRule === 'function') {
sheet.insertRule(selector + '{' + rules + '}', index);
} else if (typeof sheet.addRule === 'function') {
} else if (sheet.addRule) {
sheet.addRule(selector, rules, index);
}
},
Expand Down

0 comments on commit 016c161

Please sign in to comment.