| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // TODO(jacobr): use Lists.dart to remove some of the duplicated functionality. | 5 // TODO(jacobr): use Lists.dart to remove some of the duplicated functionality. |
| 6 class _ChildrenElementList implements ElementList { | 6 class _ChildrenElementList implements ElementList { |
| 7 // Raw Element. | 7 // Raw Element. |
| 8 final _element; | 8 final _element; |
| 9 final _childElements; | 9 final _childElements; |
| 10 | 10 |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 } | 595 } |
| 596 | 596 |
| 597 void focus() { | 597 void focus() { |
| 598 _ptr.focus(); | 598 _ptr.focus(); |
| 599 } | 599 } |
| 600 | 600 |
| 601 ClientRect getBoundingClientRect() { | 601 ClientRect getBoundingClientRect() { |
| 602 return LevelDom.wrapClientRect(_ptr.getBoundingClientRect()); | 602 return LevelDom.wrapClientRect(_ptr.getBoundingClientRect()); |
| 603 } | 603 } |
| 604 | 604 |
| 605 ClientRectList getClientRects() { | 605 List<ClientRect> getClientRects() { |
| 606 return LevelDom.wrapClientRectList(_ptr.getClientRects()); | 606 var rects = LevelDom.wrapClientRectList(_ptr.getClientRects()); |
| 607 var out = new List(rects.length); |
| 608 for (var i = 0; i < rects.length; i++) { |
| 609 out.add(rects.item(i)); |
| 610 } |
| 611 return out; |
| 607 } | 612 } |
| 608 | 613 |
| 609 Element insertAdjacentElement([String where = null, Element element = null]) { | 614 Element insertAdjacentElement([String where = null, Element element = null]) { |
| 610 return LevelDom.wrapElement(_ptr.insertAdjacentElement(where, LevelDom.unwra
p(element))); | 615 return LevelDom.wrapElement(_ptr.insertAdjacentElement(where, LevelDom.unwra
p(element))); |
| 611 } | 616 } |
| 612 | 617 |
| 613 void insertAdjacentHTML([String position_OR_where = null, String text = null])
{ | 618 void insertAdjacentHTML([String position_OR_where = null, String text = null])
{ |
| 614 _ptr.insertAdjacentHTML(position_OR_where, text); | 619 _ptr.insertAdjacentHTML(position_OR_where, text); |
| 615 } | 620 } |
| 616 | 621 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 644 return _ptr.webkitMatchesSelector(selectors); | 649 return _ptr.webkitMatchesSelector(selectors); |
| 645 } | 650 } |
| 646 | 651 |
| 647 ElementEvents get on() { | 652 ElementEvents get on() { |
| 648 if (_on === null) { | 653 if (_on === null) { |
| 649 _on = new ElementEventsImplementation._wrap(_ptr); | 654 _on = new ElementEventsImplementation._wrap(_ptr); |
| 650 } | 655 } |
| 651 return _on; | 656 return _on; |
| 652 } | 657 } |
| 653 } | 658 } |
| OLD | NEW |