Added table (and related things).

This commit is contained in:
2020-03-23 11:10:49 +05:00
parent 5d2d29a61d
commit ef80c9176e
12 changed files with 388 additions and 6 deletions

View File

@@ -33,3 +33,9 @@ func (g *Generic) AddClassesFromString(classes string) {
func (g *Generic) InitializeGeneric() {
g.initializeInnerItems()
}
// SetTextContent sets text content for passed object. Note that not
// all HTML elements able to display it.
func (g *Generic) SetTextContent(text string) {
g.Object.Set("textContent", text)
}

View File

@@ -21,8 +21,7 @@ func (it *InnerItems) AddChild(object Buildable) {
// BuildChilds build child elements and adds them to parent.
func (it *InnerItems) BuildChilds(parent *js.Object) {
for _, item := range it.innerItems {
itemObj := item.Build()
parent.Call(common.JSCallAppendChild, itemObj)
parent.Call(common.JSCallAppendChild, item.Build())
}
}