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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 @DocsEditable() | 7 @DocsEditable() |
8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node | 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node |
9 { | 9 { |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 } | 85 } |
86 | 86 |
87 return wrapped; | 87 return wrapped; |
88 $endif | 88 $endif |
89 } | 89 } |
90 | 90 |
91 $if DART2JS | 91 $if DART2JS |
92 // The two-argument version of this is automatically generated, but we need to | 92 // The two-argument version of this is automatically generated, but we need to |
93 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. | 93 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. |
94 @DomName('Document.createElement') | 94 @DomName('Document.createElement') |
95 _createElement_2(String tagName) => JS('', '#.createElement(#)', this, tagName
); | 95 _createElement_2(String tagName) => |
| 96 JS('Element', '#.createElement(#)', this, tagName); |
96 | 97 |
97 // The three-argument version of this is automatically generated, but we need
to | 98 // The three-argument version of this is automatically generated, but we need
to |
98 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. | 99 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. |
99 @DomName('Document.createElementNS') | 100 @DomName('Document.createElementNS') |
100 _createElementNS_2(String namespaceURI, String qualifiedName) => | 101 _createElementNS_2(String namespaceURI, String qualifiedName) => |
101 JS('', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName); | 102 JS('Element', '#.createElementNS(#, #)', this, namespaceURI, qualifiedName
); |
102 | 103 |
103 $endif | 104 $endif |
104 @DomName('Document.createElementNS') | 105 @DomName('Document.createElementNS') |
105 @DocsEditable() | 106 @DocsEditable() |
106 Element createElementNS(String namespaceURI, String qualifiedName, [String typ
eExtension]) { | 107 Element createElementNS(String namespaceURI, String qualifiedName, [String typ
eExtension]) { |
107 $if DART2JS | 108 $if DART2JS |
108 return (typeExtension == null) | 109 return (typeExtension == null) |
109 ? _createElementNS_2(namespaceURI, qualifiedName) | 110 ? _createElementNS_2(namespaceURI, qualifiedName) |
110 : _createElementNS(namespaceURI, qualifiedName, typeExtension); | 111 : _createElementNS(namespaceURI, qualifiedName, typeExtension); |
111 $else | 112 $else |
(...skipping 26 matching lines...) Expand all Loading... |
138 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', | 139 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', |
139 this, root, whatToShow, filter); | 140 this, root, whatToShow, filter); |
140 | 141 |
141 @DomName('Document.createTreeWalker') | 142 @DomName('Document.createTreeWalker') |
142 TreeWalker _createTreeWalker(Node root, | 143 TreeWalker _createTreeWalker(Node root, |
143 [int whatToShow, NodeFilter filter]) | 144 [int whatToShow, NodeFilter filter]) |
144 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', | 145 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', |
145 this, root, whatToShow, filter); | 146 this, root, whatToShow, filter); |
146 $endif | 147 $endif |
147 } | 148 } |
OLD | NEW |