//go:build js && wasm package ultraviolet import ( "syscall/js" ) type FrameComponentWeb struct { node js.Value view View change bool url string } func NewFrameComponentWeb(view View) *FrameComponentWeb { return &FrameComponentWeb{ view: view, change: true, url: "", } } // Component func (this *FrameComponentWeb) Build(parent Component) { this.node = WebBuildFrame( this.node, parent, this.view, this.url, ) } func (this *FrameComponentWeb) Invalidate() bool { result := this.change this.change = false return result } func (this *FrameComponentWeb) Clean() { WebCleanChildren(this.node) } // JS func (this *FrameComponentWeb) Node() js.Value { return this.node } // ComponentFrame func (this *FrameComponentWeb) SetUrl(url string) { this.url = url }