File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 33
33
} ,
34
34
35
35
insert_css_rule : function ( sheet , selector , rules , index ) {
36
- if ( " insertRule" in sheet ) {
36
+ if ( typeof sheet . insertRule === 'function' ) {
37
37
sheet . insertRule ( selector + "{" + rules + "}" , index ) ;
38
38
}
39
- else if ( " addRule" in sheet ) {
39
+ else if ( typeof sheet . addRule === 'function' ) {
40
40
sheet . addRule ( selector , rules , index ) ;
41
41
}
42
42
} ,
437
437
if ( typeof max_height == 'undefined' ) {
438
438
max_height = this . _styles . _max ;
439
439
this . _styles . _max = 0 ;
440
+ var f = function ( ) { } ;
441
+ if ( typeof this . _styles . removeRule === 'function' )
442
+ f = this . _styles . removeRule ;
443
+ else if ( typeof this . _styles . deleteRule === 'function' )
444
+ f = this . _styles . deleteRule ;
440
445
while ( this . _styles . rules . length ) {
441
- this . _styles . removeRule ( 0 ) ;
446
+ f ( 0 ) ;
442
447
}
443
448
this . _update_container_height ( ) ;
444
449
}
You can’t perform that action at this time.
0 commit comments