Documentation
¶
Overview ¶
Package widgetelement writes the element file of a widget (REQ-ISL-19): the small loader that a host page loads. `gx wc build`, the dev host page and the app, which serves it at /_gx/widgets/<tag>.js, use it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Tag is the element name, for example "acme-cart".
Tag string `json:"tag"`
// Attrs are the attributes that the element sends to the server.
Attrs []string `json:"attrs"`
// Server is the origin of the Gx server, for example
// "https://api.acme.dev". Empty means the origin of the host page.
Server string `json:"server"`
// Path is the path of the GET route of the widget.
Path string `json:"path"`
// Self marks a file that the Gx server serves: the origin of the
// server is then the origin of the URL of the file.
Self bool `json:"self,omitempty"`
}
Config is the configuration of one element file.