Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 016c161

Browse files
authored
Merge pull request gridstack#532 from lpyt/patch-1
fixed ie8 not support
2 parents 28ed6fa + bd8bbff commit 016c161

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gridstack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
style.appendChild(document.createTextNode(''));
6262
}
6363
document.getElementsByTagName('head')[0].appendChild(style);
64-
return style.sheet;
64+
return style.sheet || style.styleSheet;
6565
},
6666

6767
removeStylesheet: function(id) {
@@ -71,7 +71,7 @@
7171
insertCSSRule: function(sheet, selector, rules, index) {
7272
if (typeof sheet.insertRule === 'function') {
7373
sheet.insertRule(selector + '{' + rules + '}', index);
74-
} else if (typeof sheet.addRule === 'function') {
74+
} else if (sheet.addRule) {
7575
sheet.addRule(selector, rules, index);
7676
}
7777
},

0 commit comments

Comments
 (0)