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

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

Issue 132403010: big update to observe, template_binding, polymer (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
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 29 matching lines...) Expand all
40 _initPolymerOptimized(); 40 _initPolymerOptimized();
41 return Zone.current; 41 return Zone.current;
42 } 42 }
43 43
44 /** 44 /**
45 * Same as [initPolymer], but runs the version that is optimized for deployment 45 * Same as [initPolymer], but runs the version that is optimized for deployment
46 * to the internet. The biggest difference is it omits the [Zone] that 46 * to the internet. The biggest difference is it omits the [Zone] that
47 * automatically invokes [Observable.dirtyCheck], and the list of libraries must 47 * automatically invokes [Observable.dirtyCheck], and the list of libraries must
48 * be supplied instead of being dynamically searched for at runtime. 48 * be supplied instead of being dynamically searched for at runtime.
49 */ 49 */
50 // TODO(jmesserly): change the Polymer build step to call this directly.
51 void _initPolymerOptimized() { 50 void _initPolymerOptimized() {
51 // TODO(jmesserly): there is some code in src/declaration/polymer-element.js,
52 // git version 37eea00e13b9f86ab21c85a955585e8e4237e3d2, right before
53 // it registers polymer-element, which uses Platform.deliverDeclarations to
54 // coordinate with HTML Imports. I don't think we need it so skipping.
52 document.register(PolymerDeclaration._TAG, PolymerDeclaration); 55 document.register(PolymerDeclaration._TAG, PolymerDeclaration);
53 56
54 _loadLibraries(); 57 _loadLibraries();
55 58
56 // Run this after user code so they can add to Polymer.veiledElements 59 // Run this after user code so they can add to Polymer.veiledElements
57 _preventFlashOfUnstyledContent(); 60 _preventFlashOfUnstyledContent();
58 61
59 customElementsReady.then((_) => Polymer._ready.complete()); 62 customElementsReady.then((_) => Polymer._ready.complete());
60 } 63 }
61 64
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 print("warning: methods marked with @initMethod should take no " 227 print("warning: methods marked with @initMethod should take no "
225 "arguments, ${method.simpleName} expects some."); 228 "arguments, ${method.simpleName} expects some.");
226 return; 229 return;
227 } 230 }
228 obj.invoke(method.simpleName, const []); 231 obj.invoke(method.simpleName, const []);
229 } 232 }
230 233
231 class _InitMethodAnnotation { 234 class _InitMethodAnnotation {
232 const _InitMethodAnnotation(); 235 const _InitMethodAnnotation();
233 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698