1
0
mirror of https://github.com/taigrr/wasm-experiments synced 2025-01-18 04:03:21 -08:00
2018-08-11 20:55:13 +01:00

24 lines
352 B
Go

package dom
import "github.com/dennwc/dom/js"
type Style struct {
v js.Value
}
func (s *Style) SetWidth(v Unit) {
s.v.Set("width", v.String())
}
func (s *Style) SetHeight(v Unit) {
s.v.Set("height", v.String())
}
func (s *Style) SetMarginsRaw(m string) {
s.v.Set("margin", m)
}
func (s *Style) Set(k string, v interface{}) {
s.v.Set(k, v)
}