| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 654e26f379abf531b8aa2e650286d21d67322202..5348c39ae06b86eff1c9e8fcad15ae0b172820ac 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -8313,8 +8313,7 @@ class _ChildrenElementList extends ListBase<Element>
|
| }
|
|
|
| void clear() {
|
| - // It is unclear if we want to keep non element nodes?
|
| - _element.text = '';
|
| + _element._clearChildren();
|
| }
|
|
|
| Element removeAt(int index) {
|
| @@ -19667,7 +19666,7 @@ class _ChildNodeListLazy extends ListBase<Node> implements NodeListWrapper {
|
| }
|
|
|
| void clear() {
|
| - _this.text = '';
|
| + _this._clearChildren();
|
| }
|
|
|
| void operator []=(int index, Node value) {
|
| @@ -19789,6 +19788,12 @@ class Node extends EventTarget native "Node" {
|
| }
|
| }
|
|
|
| + void _clearChildren() {
|
| + while (firstChild != null) {
|
| + _removeChild(firstChild);
|
| + }
|
| + }
|
| +
|
| /**
|
| * Print out a String representation of this Node.
|
| */
|
|
|