Documentation
¶
Index ¶
- func EmptyPayload() printer.Payload
- type Done
- type Door
- func (d *Door) Edit(cur gox.Cursor) error
- func (d *Door) Inner(ctx context.Context, content any) <-chan error
- func (d *Door) Outer(ctx context.Context, outer gox.Elem) <-chan error
- func (d *Door) Proxy(cur gox.Cursor, el gox.Elem) error
- func (d *Door) Reload(ctx context.Context) <-chan error
- func (d *Door) Static(ctx context.Context, content any) <-chan error
- func (d *Door) Unmount(ctx context.Context) <-chan error
- type Error
- type Instance
- type Pipe
- type Root
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptyPayload ¶ added in v0.10.0
Types ¶
type Door ¶
type Door struct {
// contains filtered or unexported fields
}
func (*Door) Edit ¶
Edit renders door through the gox editor pipeline.
It is a system method used by gox to support direct Door rendering, for example:
~(&doors.Door{})
func (*Door) Inner ¶ added in v0.10.0
Inner replaces the door's current children while keeping the same door container mounted. If the door is not currently mounted, the content change is stored and will be applied when the door is rendered.
The returned channel is optional to use and tracks completion. On success it sends two nil values then closes: the first means the call was scheduled (render was completed), the second means it was applied to the page. On failure it sends an error then closes. It receives context.Canceled if the operation is overwritten by a newer update, unmount, or other door operation. If the door is not mounted, it closes immediately without sending a value.
Do not wait on it during rendering. If you need to wait, use doors.Go(...), or your own goroutine with doors.DetachedContext(ctx).
func (*Door) Outer ¶ added in v0.10.0
Outer replaces the rendered door with outer while keeping the same Go Door handle alive for later updates. Unlike Door.Static, the result remains a live door that can be updated further. If the door is not currently mounted, the change is stored and will be applied when the door is rendered.
The returned channel is optional to use; see Door.Inner for the contract.
func (*Door) Proxy ¶
Proxy renders door through the gox proxy pipeline.
It is a system method used by gox to support Door proxy syntax, for example:
~>(&doors.Door{}) <div>content</div>
func (*Door) Reload ¶
Reload re-renders the door with its current content. If the door is not currently mounted, the operation completes immediately without a visual effect.
The returned channel is optional to use; see Door.Inner for the contract.
func (*Door) Static ¶ added in v0.10.0
Static removes the current door container and replaces it with static content. Unlike Door.Outer, this removes the door's DOM element entirely. If the door is not currently mounted, the change is stored and will be applied when the door is rendered.
The returned channel is optional to use; see Door.Inner for the contract.