Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElementInfo ¶
type ElementInfo struct { Tag string IsComment bool Attrs map[string]string Handlers map[string]string Binds map[string]string Ref string HTMLRender string ForData string IfData string ElseData bool ElseIfData string SwitchData string CaseData string CaseDefaultData bool IsPointer bool }
func GetElementInfo ¶
func GetElementInfo(tag string, attrs []html.Attribute, handler HTMLHandler) *ElementInfo
GetElementInfo generate ElementInfo from html.Element.Attr
func (*ElementInfo) BuildBody ¶
func (info *ElementInfo) BuildBody() string
BuildBody return string with gas element strucutre
func (*ElementInfo) RenderAttrs ¶
func (info *ElementInfo) RenderAttrs() string
RenderAttrs generate Attrs for Element
func (*ElementInfo) RenderHTMLDir ¶
func (info *ElementInfo) RenderHTMLDir() string
RenderHTMLDir generate HTML directive for Element
func (*ElementInfo) RenderHandlers ¶
func (info *ElementInfo) RenderHandlers() string
RenderHandlers generate Handlers for Element
func (*ElementInfo) RenderIsPointer ¶
func (info *ElementInfo) RenderIsPointer() string
RenderIsPointer generate IsPointer for Element
func (*ElementInfo) RenderRef ¶
func (info *ElementInfo) RenderRef() string
RenderRef return RefName for Element
type HTMLCompiler ¶
type HTMLCompiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler() *HTMLCompiler
func (*HTMLCompiler) AddOnAttribute ¶
func (c *HTMLCompiler) AddOnAttribute(f func(string, string, *gasx.BlockInfo))
func (*HTMLCompiler) AddOnElementInfo ¶
func (c *HTMLCompiler) AddOnElementInfo(f func(*ElementInfo))
func (*HTMLCompiler) AddOnNode ¶
func (c *HTMLCompiler) AddOnNode(f func(*html.Node))
func (*HTMLCompiler) Block ¶
func (c *HTMLCompiler) Block() gasx.BlockCompiler
type HTMLHandler ¶
type HTMLHandler struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.