improved bundler, handle width/height atts

This commit is contained in:
Leo Horie 2016-09-23 10:31:33 -04:00
parent e58fa538bc
commit b8ef290acd
13 changed files with 1211 additions and 786 deletions

View file

@ -76,6 +76,16 @@ o.spec("attributes", function() {
o(a.dom.attributes["href"]).equals(undefined)
})
})
o.spec("canvas width and height", function() {
o("uses attribute API", function() {
var canvas = {tag: "canvas", attrs: {width: "100%"}}
render(root, canvas)
o(canvas.dom.attributes["width"].nodeValue).equals("100%")
o(canvas.dom.width).equals(100)
})
})
o.spec("svg class", function() {
o("when className is specified then it should be added as a class", function() {
var a = {tag: "svg", attrs: {className: "test"}}