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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 /** Invoked when this component gets inserted in the DOM tree. */ | 117 /** Invoked when this component gets inserted in the DOM tree. */ |
118 void inserted() {} | 118 void inserted() {} |
119 | 119 |
120 /** Invoked when this component is removed from the DOM tree. */ | 120 /** Invoked when this component is removed from the DOM tree. */ |
121 void removed() {} | 121 void removed() {} |
122 | 122 |
123 // TODO(jmesserly): how do we implement this efficiently? | 123 // TODO(jmesserly): how do we implement this efficiently? |
124 // See https://github.com/dart-lang/web-ui/issues/37 | 124 // See https://github.com/dart-lang/web-ui/issues/37 |
125 /** Invoked when any attribute of the component is modified. */ | 125 /** Invoked when any attribute of the component is modified. */ |
126 void attributeChanged(String name, String oldValue, String newValue) {} | 126 void attributeChanged(String name, String oldValue) {} |
127 | 127 |
128 | 128 |
129 /** | 129 /** |
130 * **Note**: This is an implementation helper and should not need to be called | 130 * **Note**: This is an implementation helper and should not need to be called |
131 * from your code. | 131 * from your code. |
132 * | 132 * |
133 * If [ShadowRoot.supported] or [useShadowDom] is false, this distributes | 133 * If [ShadowRoot.supported] or [useShadowDom] is false, this distributes |
134 * children to the insertion points of the emulated ShadowRoot. | 134 * children to the insertion points of the emulated ShadowRoot. |
135 * This is an implementation helper and should not need to be called from your | 135 * This is an implementation helper and should not need to be called from your |
136 * code. | 136 * code. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 * traversal. | 341 * traversal. |
342 */ | 342 */ |
343 bool useShadowDom = false; | 343 bool useShadowDom = false; |
344 | 344 |
345 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; | 345 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; |
346 | 346 |
347 /** | 347 /** |
348 * Set this to the [Element] to be used as the root for the Web UI app. | 348 * Set this to the [Element] to be used as the root for the Web UI app. |
349 */ | 349 */ |
350 Element webUIRoot = document.body; | 350 Element webUIRoot = document.body; |
OLD | NEW |