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

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

Issue 10825393: Fix for Issue 3039. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Lazy implementation of the child nodes of an element that does not request 6 * Lazy implementation of the child nodes of an element that does not request
7 * the actual child nodes of an element until strictly necessary greatly 7 * the actual child nodes of an element until strictly necessary greatly
8 * improving performance for the typical cases where it is not required. 8 * improving performance for the typical cases where it is not required.
9 */ 9 */
10 class _ChildNodeListLazy implements NodeList { 10 class _ChildNodeListLazy implements NodeList {
11 final _NodeImpl _this; 11 final _NodeImpl _this;
12 12
13 _ChildNodeListLazy(this._this); 13 _ChildNodeListLazy(this._this);
14 14
15 15
16 $if DART2JS 16 $if DART2JS
17 _NodeImpl get first() native "return this._this.firstChild;"; 17 _NodeImpl get first() => JS('_NodeImpl', '#.firstChild', _this);
18 _NodeImpl last() native "return this._this.lastChild;"; 18 _NodeImpl last() => JS('_NodeImpl', '#.lastChild', _this);
19 $else 19 $else
20 _NodeImpl get first() => _this.$dom_firstChild; 20 _NodeImpl get first() => _this.$dom_firstChild;
21 _NodeImpl last() => _this.$dom_lastChild; 21 _NodeImpl last() => _this.$dom_lastChild;
22 $endif 22 $endif
23 23
24 void add(_NodeImpl value) { 24 void add(_NodeImpl value) {
25 _this.$dom_appendChild(value); 25 _this.$dom_appendChild(value);
26 } 26 }
27 27
28 void addLast(_NodeImpl value) { 28 void addLast(_NodeImpl value) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 final _NodeImpl parent = this.parent; 137 final _NodeImpl parent = this.parent;
138 parent.$dom_replaceChild(otherNode, this); 138 parent.$dom_replaceChild(otherNode, this);
139 } catch(var e) { 139 } catch(var e) {
140 140
141 }; 141 };
142 return this; 142 return this;
143 } 143 }
144 144
145 $!MEMBERS 145 $!MEMBERS
146 } 146 }
OLDNEW
« no previous file with comments | « no previous file | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698