Bypass css text (#2811)
* [DOM mocks] enable setting element.style * Use the style setter directly
This commit is contained in:
parent
645cf663b2
commit
c1fc1de772
3 changed files with 9 additions and 13 deletions
|
|
@ -800,10 +800,10 @@ module.exports = function($window) {
|
|||
// Styles are equivalent, do nothing.
|
||||
} else if (style == null) {
|
||||
// New style is missing, just clear it.
|
||||
element.style.cssText = ""
|
||||
element.style = ""
|
||||
} else if (typeof style !== "object") {
|
||||
// New style is a string, let engine deal with patching.
|
||||
element.style.cssText = style
|
||||
element.style = style
|
||||
} else if (old == null || typeof old !== "object") {
|
||||
// `old` is missing or a string, `style` is an object.
|
||||
element.style.cssText = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue