children 属性
此元素的直接子元素列表。
该集合可用于向文档中添加和删除元素。
var item = new DivElement();
item.text = 'Something';
document.body.children.add(item) // Item is now displayed on the page.
for (var element in document.body.children) {
element.style.background = 'red'; // Turns every child of body red.
}
实现
List<Element> get children => new _ChildrenElementList._wrap(this);
实现
set children(List<Element> value) {
// Copy list first since we don't want liveness during iteration.
var copy = value.toList();
var children = this.children;
children.clear();
children.addAll(copy);
}