Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: tools/dom/templates/html/impl/impl_Document.darttemplate

Issue 1486803002: Use proper type in _createElement_2 (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698