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

Side by Side Diff: client/dom/templates/html/impl/impl_Node.darttemplate

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
6 _NodeListImpl get nodes() {
7 final list = _childNodes;
8 list._parent = this;
9 return list;
10 }
11
12 void set nodes(Collection<Node> value) {
13 // Copy list first since we don't want liveness during iteration.
14 // TODO(jacobr): there is a better way to do this.
15 List copy = new List.from(value);
16 nodes.clear();
17 nodes.addAll(copy);
18 }
19
20 // TODO(jacobr): should we throw an exception if parent is already null?
21 _NodeImpl remove() {
22 if (this.parent != null) {
23 this.parent._removeChild(this);
24 }
25 return this;
26 }
27
28 _NodeImpl replaceWith(Node otherNode) {
29 try {
30 this.parent._replaceChild(otherNode, this);
31 } catch(var e) {
32
33 };
34 return this;
35 }
36
37 $!MEMBERS
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698