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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 10987080: Adding 'supported' check for shadow root. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. Created 8 years, 2 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 | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index 5c98b29e2b9afa8fc284a8ca0cf491bba2c6bf26..dcc8123d38211f738e7a2dad74b09bc63f1e5ce0 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -31391,7 +31391,14 @@ abstract class ShadowRoot implements DocumentFragment {
/** @domName ShadowRoot.getSelection */
DOMSelection getSelection();
+
+ static bool get supported => _ShadowRootImpl.supported;
}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot native "*ShadowRoot" {
@@ -31412,6 +31419,9 @@ class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot native
_NodeListImpl $dom_getElementsByTagName(String tagName) native "getElementsByTagName";
_DOMSelectionImpl getSelection() native;
+
+ static bool get supported =>
+ JS('bool', '!!(window.ShadowRoot || window.WebKitShadowRoot)');
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -39537,7 +39547,7 @@ class _SessionDescriptionFactoryProvider {
class _ShadowRootFactoryProvider {
static ShadowRoot createShadowRoot(Element host) native '''
- return new WebKitShadowRoot(host);
+ return new (window.ShadowRoot || window.WebKitShadowRoot)(host);
''';
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698