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

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

Issue 10800104: Convert DOM and HTML frog to dart2js. (Closed) Base URL: http://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
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 $CLASSNAME extends _NodeImpl implements Document 5 class $CLASSNAME extends _NodeImpl implements Document
6 $if FROG 6 $if DART2JS
7 native "*HTMLDocument" 7 native "*HTMLDocument"
8 $endif 8 $endif
9 { 9 {
10 10
11 $!MEMBERS 11 $!MEMBERS
12 // TODO(jacobr): implement all Element methods not on Document. 12 // TODO(jacobr): implement all Element methods not on Document.
13 13
14 _ElementImpl query(String selectors) { 14 _ElementImpl query(String selectors) {
15 // It is fine for our RegExp to detect element id query selectors to have 15 // It is fine for our RegExp to detect element id query selectors to have
16 // false negatives but not false positives. 16 // false negatives but not false positives.
(...skipping 19 matching lines...) Expand all
36 final copyOfMatches = new List<Element>(len); 36 final copyOfMatches = new List<Element>(len);
37 for (int i = 0; i < len; ++i) { 37 for (int i = 0; i < len; ++i) {
38 copyOfMatches[i] = mutableMatches[i]; 38 copyOfMatches[i] = mutableMatches[i];
39 } 39 }
40 return new _FrozenElementList._wrap(copyOfMatches); 40 return new _FrozenElementList._wrap(copyOfMatches);
41 } else { 41 } else {
42 return new _FrozenElementList._wrap($dom_querySelectorAll(selectors)); 42 return new _FrozenElementList._wrap($dom_querySelectorAll(selectors));
43 } 43 }
44 } 44 }
45 } 45 }
OLDNEW
« no previous file with comments | « lib/dom/templates/html/frog/impl_Window.darttemplate ('k') | lib/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698