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

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

Issue 24084004: Exposing document.createElement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 part of $LIBRARYNAME; 7 part of $LIBRARYNAME;
8 8
9 /** 9 /**
10 * Model-Driven Views (MDV)'s native features enables a wide-range of use cases, 10 * Model-Driven Views (MDV)'s native features enables a wide-range of use cases,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // <tr template repeat="{{ foo }}"" class="bar"><td>Bar</td></tr> 194 // <tr template repeat="{{ foo }}"" class="bar"><td>Bar</td></tr>
195 // 195 //
196 // becomes 196 // becomes
197 // 197 //
198 // <template repeat="{{ foo }}"> 198 // <template repeat="{{ foo }}">
199 // + #document-fragment 199 // + #document-fragment
200 // + <tr class="bar"> 200 // + <tr class="bar">
201 // + <td>Bar</td> 201 // + <td>Bar</td>
202 // 202 //
203 static Element _extractTemplateFromAttributeTemplate(Element el) { 203 static Element _extractTemplateFromAttributeTemplate(Element el) {
204 var template = el.document.$dom_createElement('template'); 204 var template = el.document.createElement('template');
205 el.parentNode.insertBefore(template, el); 205 el.parentNode.insertBefore(template, el);
206 206
207 for (var name in el.attributes.keys.toList()) { 207 for (var name in el.attributes.keys.toList()) {
208 switch (name) { 208 switch (name) {
209 case 'template': 209 case 'template':
210 el.attributes.remove(name); 210 el.attributes.remove(name);
211 break; 211 break;
212 case 'repeat': 212 case 'repeat':
213 case 'bind': 213 case 'bind':
214 case 'ref': 214 case 'ref':
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 */ 299 */
300 void setInnerHtml(String html, 300 void setInnerHtml(String html,
301 {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) { 301 {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) {
302 text = null; 302 text = null;
303 var fragment = createFragment( 303 var fragment = createFragment(
304 html, validator: validator, treeSanitizer: treeSanitizer); 304 html, validator: validator, treeSanitizer: treeSanitizer);
305 305
306 content.append(fragment); 306 content.append(fragment);
307 } 307 }
308 } 308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698