Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * This library exports all of the commonly used functions and types for | 6 * Custom HTML tags, data binding, and templates for building |
| 7 * building UI's. | 7 * structured, encapsulated, client-side web apps. |
| 8 * | 8 * |
| 9 * See this article for more information: | 9 * Polymer.dart, the next evolution of Web UI, |
| 10 * <http://www.dartlang.org/articles/dart-web-components/>. | 10 * is an in-progress Dart port of the |
| 11 * [Polymer project](http://www.polymer-project.org/). | |
| 12 * Polymer.dart compiles to JavaScript and runs across the modern web. | |
| 13 * | |
| 14 * To use polymer.dart in your application, | |
| 15 * first add a dependency to the app's pubspec.yaml file. | |
| 16 * Instead of using the open-ended `any` version specifier, | |
| 17 * we recommend using a range of version numbers. | |
| 18 * | |
| 19 * dependencies: | |
| 20 * polymer: '>=0.7.1 <0.8' | |
|
Kathy Walrath
2013/09/13 16:44:16
Clarify whether these particular version numbers a
mem
2013/09/13 17:05:58
Done.
| |
| 21 * | |
| 22 * (For details about package dependencies and version constraints, | |
|
Kathy Walrath
2013/09/13 16:44:16
Move this up above the example. Maybe just make "d
mem
2013/09/13 17:05:58
Done.
| |
| 23 * read [Dependencies](http://pub.dartlang.org/doc/dependencies.html)). | |
| 24 * | |
| 25 * Then import the library into your application: | |
| 26 * | |
| 27 * import 'package:polymer/polymer.dart'; | |
| 28 * | |
| 29 * ## Other resources | |
| 30 * | |
| 31 * * Refer to the | |
|
Kathy Walrath
2013/09/13 16:44:16
I'd prefer to put the links first, so they're in a
mem
2013/09/13 17:05:58
Done.
| |
| 32 * [Polymer.dart](http://www.dartlang.org/polymer-dart/) | |
| 33 * home page for example code, project status, and | |
| 34 * information about how to get started using Polymer.dart in your apps. | |
| 35 * | |
| 36 * * Learn more about the polymer package, including the | |
| 37 * current major release number, | |
| 38 * at the pub repository | |
| 39 * [polymer.dart package](http://pub.dartlang.org/packages/polymer). | |
| 40 * | |
| 41 * * If you were using Web UI in your apps, | |
| 42 * [Upgrading to Polymer.dart] | |
| 43 * (http://www.dartlang.org/polymer-dart/upgrading-to-polymer-from-web-ui.html) | |
| 44 * contains some tips to help you convert. | |
| 11 */ | 45 */ |
| 12 library polymer; | 46 library polymer; |
| 13 | 47 |
| 14 import 'dart:async'; | 48 import 'dart:async'; |
| 15 import 'dart:mirrors'; | 49 import 'dart:mirrors'; |
| 16 | 50 |
| 17 import 'package:mdv/mdv.dart' as mdv; | 51 import 'package:mdv/mdv.dart' as mdv; |
| 18 import 'package:observe/src/microtask.dart'; | 52 import 'package:observe/src/microtask.dart'; |
| 19 import 'package:path/path.dart' as path; | 53 import 'package:path/path.dart' as path; |
| 20 import 'polymer_element.dart' show registerPolymerElement; | 54 import 'polymer_element.dart' show registerPolymerElement; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 print("warning: methods marked with @initMethod should take no " | 172 print("warning: methods marked with @initMethod should take no " |
| 139 "arguments, ${method.simpleName} expects some."); | 173 "arguments, ${method.simpleName} expects some."); |
| 140 return; | 174 return; |
| 141 } | 175 } |
| 142 obj.invoke(method.simpleName, const []); | 176 obj.invoke(method.simpleName, const []); |
| 143 } | 177 } |
| 144 | 178 |
| 145 class _InitMethodAnnotation { | 179 class _InitMethodAnnotation { |
| 146 const _InitMethodAnnotation(); | 180 const _InitMethodAnnotation(); |
| 147 } | 181 } |
| OLD | NEW |