[FIX] IE9 - Catch error when we try to load a new stylesheet but that we have already reached the max number of sheet in IE9 : 31
bzr revid: jke@openerp.com-20140325172147-6ymq1ixebawj4ce2
This commit is contained in:
parent
e61d12bfa7
commit
062ee7485c
|
@ -582,7 +582,11 @@
|
||||||
var tag;
|
var tag;
|
||||||
//if ('\v' == 'v') /* ie only */ {
|
//if ('\v' == 'v') /* ie only */ {
|
||||||
if (document.createStyleSheet) {
|
if (document.createStyleSheet) {
|
||||||
document.createStyleSheet().cssText = css;
|
try {
|
||||||
|
document.createStyleSheet().cssText = css;
|
||||||
|
} catch(err) {
|
||||||
|
console.log('Failed - IE9 limit 31 sheets CSS');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tag = document.createElement('style');
|
tag = document.createElement('style');
|
||||||
tag.type = 'text/css';
|
tag.type = 'text/css';
|
||||||
|
|
Loading…
Reference in New Issue