Fix style updates to avoid unnecessary allocation (#2312)
* Fix style updates to avoid unnecessary allocation - Drive-by: properly censor `cssFloat` -> css `float:` to match DOM behavior * Document `style` syntax + custom property support. [skip ci] * Add a missing test * Add a few more descriptive comments. * Update changelog [skip ci]
This commit is contained in:
parent
b25e8e15a0
commit
8134c51a48
4 changed files with 41 additions and 25 deletions
|
|
@ -45,6 +45,13 @@ o.spec("createElement", function() {
|
|||
|
||||
o(vnode.dom.style["--cssVar"]).equals("red")
|
||||
})
|
||||
o("censors cssFloat to float", function() {
|
||||
var vnode = {tag: "a", attrs: {style: {cssFloat: "left"}}}
|
||||
|
||||
render(root, [vnode])
|
||||
|
||||
o(vnode.dom.style.float).equals("left")
|
||||
})
|
||||
o("creates children", function() {
|
||||
var vnode = {tag: "div", children: [{tag: "a"}, {tag: "b"}]}
|
||||
render(root, [vnode])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue