| Index: sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
|
| diff --git a/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate b/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
|
| index 98185a47c1f14c9b70a6fa0d1777bbeb76d8c4b8..22ec7403bd93f6b1645233718460c84959fc0ab5 100644
|
| --- a/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
|
| +++ b/sdk/lib/html/templates/html/impl/impl_DocumentFragment.darttemplate
|
| @@ -28,22 +28,30 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| factory $CLASSNAME.svg(String svgContent) =>
|
| _$(CLASSNAME)FactoryProvider.createDocumentFragment_svg(svgContent);
|
|
|
| - List<Element> _elements;
|
| + List<Element> get elements => this.children;
|
|
|
| - List<Element> get elements {
|
| - if (_elements == null) {
|
| - _elements = new FilteredElementList(this);
|
| + // TODO: The type of value should be Collection<Element>. See http://b/5392897
|
| + void set elements(value) {
|
| + this.children = value;
|
| + }
|
| +
|
| + // Native field is used only by Dart code so does not lead to instantiation
|
| + // of native classes
|
| + @Creates('Null')
|
| + List<Element> _children;
|
| + List<Element> get children {
|
| + if (_children == null) {
|
| + _children = new FilteredElementList(this);
|
| }
|
| - return _elements;
|
| + return _children;
|
| }
|
|
|
| - // TODO: The type of value should be Collection<Element>. See http://b/5392897
|
| - void set elements(value) {
|
| + void set children(Collection<Element> value) {
|
| // Copy list first since we don't want liveness during iteration.
|
| List copy = new List.from(value);
|
| - final elements = this.elements;
|
| - elements.clear();
|
| - elements.addAll(copy);
|
| + var children = this.children;
|
| + children.clear();
|
| + children.addAll(copy);
|
| }
|
|
|
| Element query(String selectors) => $dom_querySelector(selectors);
|
|
|