| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //go:build js && wasm
- package ultraviolet
- import (
- "syscall/js"
- )
- type ContainerComponentWeb struct {
- node js.Value
- view View
- change bool
- }
- func NewContainerComponentWeb(view View) *ContainerComponentWeb {
- return &ContainerComponentWeb{
- view: view,
- change: true,
- }
- }
- // Component
- func (this *ContainerComponentWeb) Build(parent Component) {
- this.node = WebBuildDiv(
- this.node,
- parent,
- this.view,
- "",
- "",
- AbstractHandlers{},
- )
- }
- func (this *ContainerComponentWeb) Invalidate() bool {
- result := this.change
- this.change = false
- return result
- }
- func (this *ContainerComponentWeb) Clean() {
- WebCleanChildren(this.node)
- this.change = true
- }
- // JS
- func (this *ContainerComponentWeb) Node() js.Value {
- return this.node
- }
|