| 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 // TODO(jacobr): use _Lists.dart to remove some of the duplicated | 5 // TODO(jacobr): use _Lists.dart to remove some of the duplicated |
| 6 // functionality. | 6 // functionality. |
| 7 class _ChildrenElementList implements List { | 7 class _ChildrenElementList implements List { |
| 8 // Raw Element. | 8 // Raw Element. |
| 9 final _ElementImpl _element; | 9 final _ElementImpl _element; |
| 10 final _HTMLCollectionImpl _childElements; | 10 final _HTMLCollectionImpl _childElements; |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 } | 731 } |
| 732 | 732 |
| 733 void addHTML(String text) { | 733 void addHTML(String text) { |
| 734 this.insertAdjacentHTML('beforeend', text); | 734 this.insertAdjacentHTML('beforeend', text); |
| 735 } | 735 } |
| 736 | 736 |
| 737 // Hooks to support custom WebComponents. | 737 // Hooks to support custom WebComponents. |
| 738 var xtag; | 738 var xtag; |
| 739 | 739 |
| 740 $if DARTIUM | 740 $if DARTIUM |
| 741 noSuchMethod(InvocationMirror invocation) { | 741 noSuchMethod(String name, List args) { |
| 742 if (dynamicUnknownElementDispatcher == null) { | 742 if (dynamicUnknownElementDispatcher == null) { |
| 743 throw new NoSuchMethodError(this, invocation.methodName, | 743 throw new NoSuchMethodError(this, name, args); |
| 744 invocation.positionalArguments, | |
| 745 invocation.namedArguments); | |
| 746 } else { | 744 } else { |
| 747 return dynamicUnknownElementDispatcher(this, name, args); | 745 return dynamicUnknownElementDispatcher(this, name, args); |
| 748 } | 746 } |
| 749 } | 747 } |
| 750 $else | 748 $else |
| 751 // TODO(vsm): Implement noSuchMethod or similar for dart2js. | 749 // TODO(vsm): Implement noSuchMethod or similar for dart2js. |
| 752 $endif | 750 $endif |
| 753 | 751 |
| 754 $if DART2JS | 752 $if DART2JS |
| 755 /** @domName Element.insertAdjacentText */ | 753 /** @domName Element.insertAdjacentText */ |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 $if DART2JS | 871 $if DART2JS |
| 874 // Optimization to improve performance until the dart2js compiler inlines this | 872 // Optimization to improve performance until the dart2js compiler inlines this |
| 875 // method. | 873 // method. |
| 876 static Element createElement_tag(String tag) => | 874 static Element createElement_tag(String tag) => |
| 877 JS('Element', 'document.createElement(#)', tag); | 875 JS('Element', 'document.createElement(#)', tag); |
| 878 $else | 876 $else |
| 879 static Element createElement_tag(String tag) => | 877 static Element createElement_tag(String tag) => |
| 880 _document.$dom_createElement(tag); | 878 _document.$dom_createElement(tag); |
| 881 $endif | 879 $endif |
| 882 } | 880 } |
| OLD | NEW |