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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 38662f7a082844b4fde1b17ee403d4520a8f5362..7a08fb86ca7ff002d22233fd059f8ed65e482c79 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -8870,6 +8870,15 @@ abstract class Element extends Node implements ParentNode, ChildNode native "Ele
bool _templateIsDecorated;
+ @DomName('Element.createShadowRoot')
+ @SupportedBrowser(SupportedBrowser.CHROME, '25')
+ @Experimental()
+ ShadowRoot createShadowRoot() {
+ return JS('ShadowRoot',
+ '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)',
+ this, this, this);
+ }
+
/**
* Gets the template this node refers to.
@@ -9506,13 +9515,6 @@ abstract class Element extends Node implements ParentNode, ChildNode native "Ele
@DocsEditable()
void blur() native;
- @DomName('Element.createShadowRoot')
- @DocsEditable()
- @SupportedBrowser(SupportedBrowser.CHROME, '25')
- @Experimental()
- // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-shadow-aware-create-shadow-root
- ShadowRoot createShadowRoot() native;
-
@DomName('Element.focus')
@DocsEditable()
void focus() native;
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698