Пример #1
0
func TestCss(dom s5.NarrowDom, needInit bool) {
	if needInit {
		//simulate a couple of browser settings
		dom.SetCss("color", "rgb(0, 0, 0)")
		dom.SetCss("float", "none")
	}
	//need to pick a property that is NOT defined
	d := dom.Css("color")
	if d != "rgb(0, 0, 0)" {
		panic("before any code has run, no css color expected")
	}
	dom.SetCss("float", "right")
	d = dom.Css("float")
	if d != "right" {
		panic("expected to get right for float")
	}
	dom.SetCss("float", "none")
}