| 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 exposes the types in [watcher], [safe_html], [templating] and | 6 * This library exposes the types in [observe], [safe_html], [templating], |
| 7 * the [WebComponent] base class. See this article for more information about | 7 * [watcher] and the [WebComponent] base class. See this article for more |
| 8 * this library: <http://www.dartlang.org/articles/dart-web-components/>. | 8 * information about this library: |
| 9 * <http://www.dartlang.org/articles/dart-web-components/>. |
| 9 */ | 10 */ |
| 10 library web_ui; | 11 library web_ui; |
| 11 | 12 |
| 12 export 'watcher.dart'; | 13 export 'observe.dart'; |
| 13 export 'safe_html.dart'; | 14 export 'safe_html.dart'; |
| 14 export 'templating.dart'; | 15 export 'templating.dart'; |
| 16 export 'watcher.dart'; |
| 15 | 17 |
| 16 import 'dart:async'; | 18 import 'dart:async'; |
| 17 import 'dart:html'; | 19 import 'dart:html'; |
| 18 | 20 |
| 19 import 'package:meta/meta.dart'; | 21 import 'package:meta/meta.dart'; |
| 20 | 22 |
| 21 // Imported for the doc comment | 23 // Imported for the doc comment |
| 22 import 'watcher.dart' as watcher; | 24 import 'observe.dart' as observe; |
| 23 import 'safe_html.dart' as safe_html; | 25 import 'safe_html.dart' as safe_html; |
| 24 import 'templating.dart' as templating; | 26 import 'templating.dart' as templating; |
| 27 import 'watcher.dart' as watcher; |
| 25 | 28 |
| 26 /** | 29 /** |
| 27 * The base class for all Dart web components. In addition to the [Element] | 30 * The base class for all Dart web components. In addition to the [Element] |
| 28 * interface, it also provides lifecycle methods: | 31 * interface, it also provides lifecycle methods: |
| 29 * - [created] | 32 * - [created] |
| 30 * - [inserted] | 33 * - [inserted] |
| 31 * - [attributeChanged] | 34 * - [attributeChanged] |
| 32 * - [removed] | 35 * - [removed] |
| 33 */ | 36 */ |
| 34 abstract class WebComponent implements Element { | 37 abstract class WebComponent implements Element { |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 } | 640 } |
| 638 | 641 |
| 639 /** | 642 /** |
| 640 * Set this to true to use native Shadow DOM if it is supported. | 643 * Set this to true to use native Shadow DOM if it is supported. |
| 641 * Note that this will change behavior of [WebComponent] APIs for tree | 644 * Note that this will change behavior of [WebComponent] APIs for tree |
| 642 * traversal. | 645 * traversal. |
| 643 */ | 646 */ |
| 644 bool useShadowDom = false; | 647 bool useShadowDom = false; |
| 645 | 648 |
| 646 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; | 649 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; |
| OLD | NEW |