Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: client/html/generated/html/frog/Node.dart

Issue 9600035: Enable new dart:html wrapperless frog bindings and wrapper dartium bindings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _NodeImpl extends _EventTargetImpl implements Node native "*Node" { 5 class _NodeImpl extends _EventTargetImpl implements Node native "*Node" {
6 _NodeListImpl get nodes() { 6 _NodeListImpl get nodes() {
7 final list = _childNodes; 7 final list = _childNodes;
8 list._parent = this; 8 list._parent = this;
9 return list; 9 return list;
10 } 10 }
11 11
12 void set nodes(Collection<Node> value) { 12 void set nodes(Collection<Node> value) {
13 // Copy list first since we don't want liveness during iteration. 13 // Copy list first since we don't want liveness during iteration.
14 // TODO(jacobr): there is a better way to do this. 14 // TODO(jacobr): there is a better way to do this.
15 List copy = new List.from(value); 15 List copy = new List.from(value);
16 nodes.clear(); 16 text = '';
17 nodes.addAll(copy); 17 for (Node node in copy) {
18 _appendChild(node);
19 }
18 } 20 }
19 21
20 // TODO(jacobr): should we throw an exception if parent is already null? 22 // TODO(jacobr): should we throw an exception if parent is already null?
21 _NodeImpl remove() { 23 _NodeImpl remove() {
22 if (this.parent != null) { 24 if (this.parent != null) {
23 this.parent._removeChild(this); 25 this.parent._removeChild(this);
24 } 26 }
25 return this; 27 return this;
26 } 28 }
27 29
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 99
98 bool hasChildNodes() native; 100 bool hasChildNodes() native;
99 101
100 _NodeImpl insertBefore(_NodeImpl newChild, _NodeImpl refChild) native; 102 _NodeImpl insertBefore(_NodeImpl newChild, _NodeImpl refChild) native;
101 103
102 _NodeImpl _removeChild(_NodeImpl oldChild) native "return this.removeChild(old Child);"; 104 _NodeImpl _removeChild(_NodeImpl oldChild) native "return this.removeChild(old Child);";
103 105
104 _NodeImpl _replaceChild(_NodeImpl newChild, _NodeImpl oldChild) native "return this.replaceChild(newChild, oldChild);"; 106 _NodeImpl _replaceChild(_NodeImpl newChild, _NodeImpl oldChild) native "return this.replaceChild(newChild, oldChild);";
105 107
106 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698