| 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'; |
| 11 * import 'package:web_ui/templating.dart'; | 11 * import 'package:web_ui/templating.dart'; |
| 12 * import 'package:web_ui/watcher.dart'; | 12 * import 'package:web_ui/watcher.dart'; |
| 13 * import 'package:web_ui/web_ui.dart' show WebComponent; | 13 * import 'package:web_ui/web_ui.dart' show WebComponent; |
| 14 * | 14 * |
| 15 * Note that the [WebComponent] base class is defined in this library. | 15 * Note that the [WebComponent] base class is defined in this library. |
| 16 * | 16 * |
| 17 * See this article for more information: | 17 * See this article for more information: |
| 18 * <http://www.dartlang.org/articles/dart-web-components/>. | 18 * <http://www.dartlang.org/articles/dart-web-components/>. |
| 19 */ | 19 */ |
| 20 library web_ui; | 20 library web_ui; |
| 21 | 21 |
| 22 export 'observe.dart'; | 22 export 'observe.dart'; |
| 23 export 'safe_html.dart'; | 23 export 'safe_html.dart'; |
| 24 export 'templating.dart'; | 24 export 'templating.dart'; |
| 25 export 'watcher.dart'; | 25 export 'watcher.dart'; |
| 26 | 26 |
| 27 import 'dart:async'; | |
| 28 import 'dart:html'; | 27 import 'dart:html'; |
| 29 import 'package:custom_element/custom_element.dart' show CustomElement; | 28 import 'package:custom_element/custom_element.dart' show CustomElement; |
| 30 import 'package:meta/meta.dart'; | |
| 31 | 29 |
| 32 /** | 30 /** |
| 33 * The base class for all Dart web components. In addition to the [Element] | 31 * The base class for all Dart web components. In addition to the [Element] |
| 34 * interface, it also provides lifecycle methods: | 32 * interface, it also provides lifecycle methods: |
| 35 * - [created] | 33 * - [created] |
| 36 * - [inserted] | 34 * - [inserted] |
| 37 * - [attributeChanged] | 35 * - [attributeChanged] |
| 38 * - [removed] | 36 * - [removed] |
| 39 */ | 37 */ |
| 40 abstract class WebComponent extends CustomElement { | 38 abstract class WebComponent extends CustomElement { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 * traversal. | 339 * traversal. |
| 342 */ | 340 */ |
| 343 bool useShadowDom = false; | 341 bool useShadowDom = false; |
| 344 | 342 |
| 345 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; | 343 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; |
| 346 | 344 |
| 347 /** | 345 /** |
| 348 * Set this to the [Element] to be used as the root for the Web UI app. | 346 * Set this to the [Element] to be used as the root for the Web UI app. |
| 349 */ | 347 */ |
| 350 Element webUIRoot = document.body; | 348 Element webUIRoot = document.body; |
| OLD | NEW |