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

Unified Diff: lib/html/dartium/html_dartium.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
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 3a4d3e3d277a6485ec96bb171912df418b2d7b1f..c12f2f6c40f32e64afdd4f05a194861033e2f12b 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -8258,7 +8258,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
num get lineDashOffset native "CanvasRenderingContext2D_lineDashOffset_Getter";
- void set lineDashOffset(num) native "CanvasRenderingContext2D_lineDashOffset_Setter";
+ void set lineDashOffset(num value) native "CanvasRenderingContext2D_lineDashOffset_Setter";
String get lineJoin native "CanvasRenderingContext2D_lineJoin_Getter";
@@ -34095,6 +34095,8 @@ 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
@@ -34128,6 +34130,15 @@ class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot {
DOMSelection getSelection() native "ShadowRoot_getSelection_Callback";
+ static bool get supported {
+ // TODO: move this to native code.
+ try {
+ new ShadowRoot(new DivElement());
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
}
// 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
« no previous file with comments | « lib/html/dart2js/html_dart2js.dart ('k') | lib/html/templates/html/dart2js/factoryprovider_ShadowRoot.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698