| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 */ | 336 */ |
| 337 Node replaceWith(Node otherNode) { host.replaceWith(otherNode); } | 337 Node replaceWith(Node otherNode) { host.replaceWith(otherNode); } |
| 338 | 338 |
| 339 /** | 339 /** |
| 340 * Removes this node from the DOM. | 340 * Removes this node from the DOM. |
| 341 */ | 341 */ |
| 342 void remove() => host.remove(); | 342 void remove() => host.remove(); |
| 343 | 343 |
| 344 Node get nextNode => host.nextNode; | 344 Node get nextNode => host.nextNode; |
| 345 | 345 |
| 346 String get nodeName => host.nodeName; |
| 346 Document get document => host.document; | 347 Document get document => host.document; |
| 347 | 348 |
| 348 Node get previousNode => host.previousNode; | 349 Node get previousNode => host.previousNode; |
| 349 | 350 |
| 350 String get text => host.text; | 351 String get text => host.text; |
| 351 | 352 |
| 352 set text(String v) { host.text = v; } | 353 set text(String v) { host.text = v; } |
| 353 | 354 |
| 354 bool contains(Node other) => host.contains(other); | 355 bool contains(Node other) => host.contains(other); |
| 355 | 356 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 377 set children(List<Element> value) { | 378 set children(List<Element> value) { |
| 378 host.children = value; | 379 host.children = value; |
| 379 } | 380 } |
| 380 | 381 |
| 381 Set<String> get classes => host.classes; | 382 Set<String> get classes => host.classes; |
| 382 | 383 |
| 383 set classes(Iterable<String> value) { | 384 set classes(Iterable<String> value) { |
| 384 host.classes = value; | 385 host.classes = value; |
| 385 } | 386 } |
| 386 | 387 |
| 388 CssRect get contentEdge => host.contentEdge; |
| 389 CssRect get paddingEdge => host.paddingEdge; |
| 390 CssRect get borderEdge => host.borderEdge; |
| 391 CssRect get marginEdge => host.marginEdge; |
| 392 |
| 393 |
| 387 Map<String, String> getNamespacedAttributes(String namespace) => | 394 Map<String, String> getNamespacedAttributes(String namespace) => |
| 388 host.getNamespacedAttributes(namespace); | 395 host.getNamespacedAttributes(namespace); |
| 389 | 396 |
| 390 CssStyleDeclaration getComputedStyle([String pseudoElement]) | 397 CssStyleDeclaration getComputedStyle([String pseudoElement]) |
| 391 => host.getComputedStyle(pseudoElement); | 398 => host.getComputedStyle(pseudoElement); |
| 392 | 399 |
| 393 Element clone(bool deep) => host.clone(deep); | 400 Element clone(bool deep) => host.clone(deep); |
| 394 | 401 |
| 395 Element get parent => host.parent; | 402 Element get parent => host.parent; |
| 396 | 403 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 void requestPointerLock() { host.requestPointerLock(); } | 528 void requestPointerLock() { host.requestPointerLock(); } |
| 522 | 529 |
| 523 Element query(String selectors) => host.query(selectors); | 530 Element query(String selectors) => host.query(selectors); |
| 524 | 531 |
| 525 ElementList queryAll(String selectors) => host.queryAll(selectors); | 532 ElementList queryAll(String selectors) => host.queryAll(selectors); |
| 526 | 533 |
| 527 HtmlCollection get $dom_children => host.$dom_children; | 534 HtmlCollection get $dom_children => host.$dom_children; |
| 528 | 535 |
| 529 int get $dom_childElementCount => host.$dom_childElementCount; | 536 int get $dom_childElementCount => host.$dom_childElementCount; |
| 530 | 537 |
| 531 String get $dom_className => host.$dom_className; | 538 String get className => host.className; |
| 532 set $dom_className(String value) { host.$dom_className = value; } | 539 set className(String value) { host.className = value; } |
| 533 | 540 |
| 534 @deprecated | 541 @deprecated |
| 535 int get clientHeight => client.height; | 542 int get clientHeight => client.height; |
| 536 | 543 |
| 537 @deprecated | 544 @deprecated |
| 538 int get clientLeft => client.left; | 545 int get clientLeft => client.left; |
| 539 | 546 |
| 540 @deprecated | 547 @deprecated |
| 541 int get clientTop => client.top; | 548 int get clientTop => client.top; |
| 542 | 549 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 766 } |
| 760 | 767 |
| 761 /** | 768 /** |
| 762 * Set this to true to use native Shadow DOM if it is supported. | 769 * Set this to true to use native Shadow DOM if it is supported. |
| 763 * Note that this will change behavior of [WebComponent] APIs for tree | 770 * Note that this will change behavior of [WebComponent] APIs for tree |
| 764 * traversal. | 771 * traversal. |
| 765 */ | 772 */ |
| 766 bool useShadowDom = false; | 773 bool useShadowDom = false; |
| 767 | 774 |
| 768 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; | 775 bool get _realShadowRoot => useShadowDom && ShadowRoot.supported; |
| OLD | NEW |