core (xmlui): container now keep a list of children

This commit is contained in:
Goffi 2017-10-01 12:21:23 +02:00
commit 3ec8f283cb

View file

@ -412,6 +412,7 @@ class Element(object):
@parent: parent element
"""
assert self.type is not None
self.children = []
if not hasattr(self, 'elem'):
self.elem = parent.xmlui.doc.createElement(self.type)
self.xmlui = xmlui
@ -427,6 +428,7 @@ class Element(object):
"""
self.elem.appendChild(child.elem)
child.parent = self
self.children.append(child)
return child