File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,24 @@ CSSOM.CSSStyleDeclaration.prototype = {
4646 this [ this . length ] = name ;
4747 this . length ++ ;
4848 }
49+
50+ // If the priority value of the incoming property is "important",
51+ // or the value of the existing property is not "important",
52+ // then remove the existing property and rewrite it.
53+ if ( priority || ! this . _importants [ name ] ) {
54+ this . removeProperty ( name ) ;
55+ this [ this . length ] = name ;
56+ this . length ++ ;
57+ this [ name ] = value + '' ;
58+ this . _importants [ name ] = priority ;
59+ }
4960 } else {
5061 // New property.
5162 this [ this . length ] = name ;
5263 this . length ++ ;
64+ this [ name ] = value + '' ;
65+ this . _importants [ name ] = priority ;
5366 }
54- this [ name ] = value + "" ;
55- this . _importants [ name ] = priority ;
5667 } ,
5768
5869 /**
You can’t perform that action at this time.
0 commit comments