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

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

Issue 22513002: Fixing polyfill for Element.createShadowRoot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('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 class _ChildrenElementList extends ListBase<Element> { 7 class _ChildrenElementList extends ListBase<Element> {
8 // Raw Element. 8 // Raw Element.
9 final Element _element; 9 final Element _element;
10 final HtmlCollection _childElements; 10 final HtmlCollection _childElements;
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 Element _templateInstanceRef; 898 Element _templateInstanceRef;
899 899
900 // Note: only used if `this is! TemplateElement` 900 // Note: only used if `this is! TemplateElement`
901 $if DART2JS 901 $if DART2JS
902 @Creates('Null') // Set from Dart code; does not instantiate a native type. 902 @Creates('Null') // Set from Dart code; does not instantiate a native type.
903 $endif 903 $endif
904 DocumentFragment _templateContent; 904 DocumentFragment _templateContent;
905 905
906 bool _templateIsDecorated; 906 bool _templateIsDecorated;
907 907
908 $if DART2JS
909 @DomName('Element.createShadowRoot')
910 @SupportedBrowser(SupportedBrowser.CHROME, '25')
911 @Experimental()
912 ShadowRoot createShadowRoot() {
913 return JS('ShadowRoot',
914 '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)',
915 this, this, this);
916 }
917 $endif
918
908 919
909 /** 920 /**
910 * Gets the template this node refers to. 921 * Gets the template this node refers to.
911 * This is only supported if [isTemplate] is true. 922 * This is only supported if [isTemplate] is true.
912 */ 923 */
913 @Experimental() 924 @Experimental()
914 Element get ref { 925 Element get ref {
915 _ensureTemplate(); 926 _ensureTemplate();
916 927
917 Element result = null; 928 Element result = null;
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 const ScrollAlignment._internal(this._value); 1296 const ScrollAlignment._internal(this._value);
1286 toString() => 'ScrollAlignment.$_value'; 1297 toString() => 'ScrollAlignment.$_value';
1287 1298
1288 /// Attempt to align the element to the top of the scrollable area. 1299 /// Attempt to align the element to the top of the scrollable area.
1289 static const TOP = const ScrollAlignment._internal('TOP'); 1300 static const TOP = const ScrollAlignment._internal('TOP');
1290 /// Attempt to center the element in the scrollable area. 1301 /// Attempt to center the element in the scrollable area.
1291 static const CENTER = const ScrollAlignment._internal('CENTER'); 1302 static const CENTER = const ScrollAlignment._internal('CENTER');
1292 /// Attempt to align the element to the bottom of the scrollable area. 1303 /// Attempt to align the element to the bottom of the scrollable area.
1293 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); 1304 static const BOTTOM = const ScrollAlignment._internal('BOTTOM');
1294 } 1305 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698