| 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 * This library exports all of the commonly used functions and types for |
| 7 * building UI's. It is equivalent to the following imports: | 7 * building UI's. It is equivalent to the following imports: |
| 8 * | 8 * |
| 9 * import 'package:web_ui/observe.dart'; | 9 * import 'package:web_ui/observe.dart'; |
| 10 * import 'package:web_ui/safe_html.dart'; | 10 * import 'package:web_ui/safe_html.dart'; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 get model => host.model; | 127 get model => host.model; |
| 128 | 128 |
| 129 void set model(newModel) { | 129 void set model(newModel) { |
| 130 host.model = newModel; | 130 host.model = newModel; |
| 131 } | 131 } |
| 132 | 132 |
| 133 get templateInstance => host.templateInstance; | 133 get templateInstance => host.templateInstance; |
| 134 get isTemplate => host.isTemplate; | 134 get isTemplate => host.isTemplate; |
| 135 get ref => host.ref; | 135 get ref => host.ref; |
| 136 get content => host.content; | 136 get content => host.content; |
| 137 DocumentFragment createInstance(model, String syntax) => | 137 DocumentFragment createInstance(model, BindingDelegate delegate) => |
| 138 host.createInstance(model, syntax); | 138 host.createInstance(model, delegate); |
| 139 createBinding(String name, model, String path) => |
| 140 host.createBinding(name, model, path); |
| 139 void bind(String name, model, String path) => host.bind(name, model, path); | 141 void bind(String name, model, String path) => host.bind(name, model, path); |
| 140 void unbind(String name) => host.unbind(name); | 142 void unbind(String name) => host.unbind(name); |
| 141 void unbindAll() => host.unbindAll(); | 143 void unbindAll() => host.unbindAll(); |
| 144 get bindings => host.bindings; |
| 145 BindingDelegate get bindingDelegate => host.bindingDelegate; |
| 146 set bindingDelegate(BindingDelegate value) { host.bindingDelegate = value; } |
| 142 | 147 |
| 143 | 148 |
| 144 /** | 149 /** |
| 145 * **Note**: This is an implementation helper and should not need to be called | 150 * **Note**: This is an implementation helper and should not need to be called |
| 146 * from your code. | 151 * from your code. |
| 147 * | 152 * |
| 148 * If [ShadowRoot.supported] or [useShadowDom] is false, this distributes | 153 * If [ShadowRoot.supported] or [useShadowDom] is false, this distributes |
| 149 * children to the insertion points of the emulated ShadowRoot. | 154 * children to the insertion points of the emulated ShadowRoot. |
| 150 * This is an implementation helper and should not need to be called from your | 155 * This is an implementation helper and should not need to be called from your |
| 151 * code. | 156 * code. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 Set<String> get classes => host.classes; | 387 Set<String> get classes => host.classes; |
| 383 | 388 |
| 384 set classes(Iterable<String> value) { | 389 set classes(Iterable<String> value) { |
| 385 host.classes = value; | 390 host.classes = value; |
| 386 } | 391 } |
| 387 | 392 |
| 388 CssRect get contentEdge => host.contentEdge; | 393 CssRect get contentEdge => host.contentEdge; |
| 389 CssRect get paddingEdge => host.paddingEdge; | 394 CssRect get paddingEdge => host.paddingEdge; |
| 390 CssRect get borderEdge => host.borderEdge; | 395 CssRect get borderEdge => host.borderEdge; |
| 391 CssRect get marginEdge => host.marginEdge; | 396 CssRect get marginEdge => host.marginEdge; |
| 392 | 397 Point get documentOffset => host.documentOffset; |
| 398 Point offsetTo(Element parent) => host.offsetTo(parent); |
| 393 | 399 |
| 394 Map<String, String> getNamespacedAttributes(String namespace) => | 400 Map<String, String> getNamespacedAttributes(String namespace) => |
| 395 host.getNamespacedAttributes(namespace); | 401 host.getNamespacedAttributes(namespace); |
| 396 | 402 |
| 397 CssStyleDeclaration getComputedStyle([String pseudoElement]) | 403 CssStyleDeclaration getComputedStyle([String pseudoElement]) |
| 398 => host.getComputedStyle(pseudoElement); | 404 => host.getComputedStyle(pseudoElement); |
| 399 | 405 |
| 400 Element clone(bool deep) => host.clone(deep); | 406 Element clone(bool deep) => host.clone(deep); |
| 401 | 407 |
| 402 Element get parent => host.parent; | 408 Element get parent => host.parent; |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 } | 772 } |
| 767 | 773 |
| 768 /** | 774 /** |
| 769 * Set this to true to use native Shadow DOM if it is supported. | 775 * Set this to true to use native Shadow DOM if it is supported. |
| 770 * Note that this will change behavior of [WebComponent] APIs for tree | 776 * Note that this will change behavior of [WebComponent] APIs for tree |
| 771 * traversal. | 777 * traversal. |
| 772 */ | 778 */ |
| 773 bool useShadowDom = false; | 779 bool useShadowDom = false; |
| 774 | 780 |
| 775 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; | 781 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; |
| OLD | NEW |