| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 _startPolymerCalled = true; | 54 _startPolymerCalled = true; |
| 55 _hookJsPolymer(); | 55 _hookJsPolymer(); |
| 56 _deployMode = deployMode; | 56 _deployMode = deployMode; |
| 57 | 57 |
| 58 if (initializers == null) { | 58 if (initializers == null) { |
| 59 throw 'Missing initialization of polymer elements. ' | 59 throw 'Missing initialization of polymer elements. ' |
| 60 'Please check that the list of entry points in your pubspec.yaml ' | 60 'Please check that the list of entry points in your pubspec.yaml ' |
| 61 'is correct. If you are using pub-serve, you may need to restart it.'; | 61 'is correct. If you are using pub-serve, you may need to restart it.'; |
| 62 } | 62 } |
| 63 | 63 |
| 64 Polymer.registerSync('d-auto-binding', AutoBindingElement, | 64 Polymer.registerSync('auto-binding-dart', AutoBindingElement, |
| 65 extendsTag: 'template'); | 65 extendsTag: 'template'); |
| 66 | 66 |
| 67 for (var initializer in initializers) { | 67 for (var initializer in initializers) { |
| 68 initializer(); | 68 initializer(); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 /// Configures [initPolymer] making it optimized for deployment to the internet. | 72 /// Configures [initPolymer] making it optimized for deployment to the internet. |
| 73 /// With this setup the initializer list is supplied instead of searched for | 73 /// With this setup the initializer list is supplied instead of searched for |
| 74 /// at runtime. Additionally, after this method is called [initPolymer] omits | 74 /// at runtime. Additionally, after this method is called [initPolymer] omits |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Note: we cache this so we can use it later to look up 'init'. | 141 // Note: we cache this so we can use it later to look up 'init'. |
| 142 // See registerSync. | 142 // See registerSync. |
| 143 JsObject _polymerElementProto = () { | 143 JsObject _polymerElementProto = () { |
| 144 var polyElem = document.createElement('polymer-element'); | 144 var polyElem = document.createElement('polymer-element'); |
| 145 var proto = new JsObject.fromBrowserObject(polyElem)['__proto__']; | 145 var proto = new JsObject.fromBrowserObject(polyElem)['__proto__']; |
| 146 if (proto is Node) proto = new JsObject.fromBrowserObject(proto); | 146 if (proto is Node) proto = new JsObject.fromBrowserObject(proto); |
| 147 return proto; | 147 return proto; |
| 148 }(); | 148 }(); |
| OLD | NEW |