Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8ef7e3de00
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (24 sloc) 0.651 kb
package view
///////////////////////////////////////////////////////////////////////////////
// Span
// Span represents a HTML span element.
type Span struct {
ViewBaseWithId
Class string
Content View
}
func (self *Span) IterateChildren(callback IterateChildrenCallback) {
if self.Content != nil {
callback(self, self.Content)
}
}
func (self *Span) Render(ctx *Context) (err error) {
ctx.Response.XML.OpenTag("span")
ctx.Response.XML.AttribIfNotDefault("id", self.id)
ctx.Response.XML.AttribIfNotDefault("class", self.Class)
if self.Content != nil {
err = self.Content.Render(ctx)
}
ctx.Response.XML.ForceCloseTag()
return err
}
Jump to Line
Something went wrong with that request. Please try again.