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

Side by Side Diff: pkg/polymer/lib/src/loader.dart

Issue 172923002: [polymer] fix editor hints -- query/queryAll and unused imports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer/test/attr_deserialize_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of polymer; 5 part of polymer;
6 6
7 /** Annotation used to automatically register polymer elements. */ 7 /** Annotation used to automatically register polymer elements. */
8 class CustomTag { 8 class CustomTag {
9 final String tagName; 9 final String tagName;
10 const CustomTag(this.tagName); 10 const CustomTag(this.tagName);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (seen == null) seen = new Set<Document>(); 120 if (seen == null) seen = new Set<Document>();
121 if (scripts == null) scripts = <String>[]; 121 if (scripts == null) scripts = <String>[];
122 if (doc == null) { 122 if (doc == null) {
123 print('warning: $baseUri not found.'); 123 print('warning: $baseUri not found.');
124 return scripts; 124 return scripts;
125 } 125 }
126 if (seen.contains(doc)) return scripts; 126 if (seen.contains(doc)) return scripts;
127 seen.add(doc); 127 seen.add(doc);
128 128
129 bool scriptSeen = false; 129 bool scriptSeen = false;
130 for (var node in doc.queryAll('script,link[rel="import"]')) { 130 for (var node in doc.querySelectorAll('script,link[rel="import"]')) {
131 if (node is LinkElement) { 131 if (node is LinkElement) {
132 _discoverScripts(node.import, node.href, seen, scripts); 132 _discoverScripts(node.import, node.href, seen, scripts);
133 } else if (node is ScriptElement && node.type == 'application/dart') { 133 } else if (node is ScriptElement && node.type == 'application/dart') {
134 if (!scriptSeen) { 134 if (!scriptSeen) {
135 var url = node.src; 135 var url = node.src;
136 scripts.add(url == '' ? baseUri : url); 136 scripts.add(url == '' ? baseUri : url);
137 scriptSeen = true; 137 scriptSeen = true;
138 } else { 138 } else {
139 print('warning: more than one Dart script tag in $baseUri. Dartium ' 139 print('warning: more than one Dart script tag in $baseUri. Dartium '
140 'currently only allows a single Dart script tag per document.'); 140 'currently only allows a single Dart script tag per document.');
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 print("warning: methods marked with @initMethod should take no " 238 print("warning: methods marked with @initMethod should take no "
239 "arguments, ${method.simpleName} expects some."); 239 "arguments, ${method.simpleName} expects some.");
240 return; 240 return;
241 } 241 }
242 initializers.add(() => obj.invoke(method.simpleName, const [])); 242 initializers.add(() => obj.invoke(method.simpleName, const []));
243 } 243 }
244 244
245 class _InitMethodAnnotation { 245 class _InitMethodAnnotation {
246 const _InitMethodAnnotation(); 246 const _InitMethodAnnotation();
247 } 247 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/instance.dart ('k') | pkg/polymer/test/attr_deserialize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698