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

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

Issue 44573005: Update polymer to commit b7200854b2441a22ce89f6563963f36c50f5150d (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 * called after all HTML imports are resolved. Polymer ensures this by asking 100 * called after all HTML imports are resolved. Polymer ensures this by asking
101 * users to put their Dart script tags after all HTML imports (this is checked 101 * users to put their Dart script tags after all HTML imports (this is checked
102 * by the linter, and Dartium will otherwise show an error message). 102 * by the linter, and Dartium will otherwise show an error message).
103 */ 103 */
104 List<String> _discoverScripts(Document doc, String baseUri, 104 List<String> _discoverScripts(Document doc, String baseUri,
105 [Set<Document> seen, List<String> scripts]) { 105 [Set<Document> seen, List<String> scripts]) {
106 if (seen == null) seen = new Set<Document>(); 106 if (seen == null) seen = new Set<Document>();
107 if (scripts == null) scripts = <String>[]; 107 if (scripts == null) scripts = <String>[];
108 if (doc == null) { 108 if (doc == null) {
109 print('warning: $baseUri not found.'); 109 print('warning: $baseUri not found.');
110 return; 110 return scripts;
111 } 111 }
112 if (seen.contains(doc)) return scripts; 112 if (seen.contains(doc)) return scripts;
113 seen.add(doc); 113 seen.add(doc);
114 114
115 var inlinedScriptCount = 0; 115 var inlinedScriptCount = 0;
116 for (var node in doc.queryAll('script,link[rel="import"]')) { 116 for (var node in doc.queryAll('script,link[rel="import"]')) {
117 if (node is LinkElement) { 117 if (node is LinkElement) {
118 _discoverScripts(node.import, node.href, seen, scripts); 118 _discoverScripts(node.import, node.href, seen, scripts);
119 } else if (node is ScriptElement && node.type == 'application/dart') { 119 } else if (node is ScriptElement && node.type == 'application/dart') {
120 var url = node.src; 120 var url = node.src;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 print("warning: methods marked with @initMethod should take no " 256 print("warning: methods marked with @initMethod should take no "
257 "arguments, ${method.simpleName} expects some."); 257 "arguments, ${method.simpleName} expects some.");
258 return; 258 return;
259 } 259 }
260 obj.invoke(method.simpleName, const []); 260 obj.invoke(method.simpleName, const []);
261 } 261 }
262 262
263 class _InitMethodAnnotation { 263 class _InitMethodAnnotation {
264 const _InitMethodAnnotation(); 264 const _InitMethodAnnotation();
265 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698