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

Unified Diff: pkg/web_components/lib/dart_support.js

Issue 462333002: Change how we check for user agent, in preparation for breaking change in Dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/web_components/CHANGELOG.md ('k') | pkg/web_components/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/web_components/lib/dart_support.js
diff --git a/pkg/web_components/lib/dart_support.js b/pkg/web_components/lib/dart_support.js
index efa130106068a64608998a29152adb148a7f5d8e..7ce882cef9a107d18d5fc8ec23de4d7df69673d8 100644
--- a/pkg/web_components/lib/dart_support.js
+++ b/pkg/web_components/lib/dart_support.js
@@ -7,7 +7,9 @@
var ShadowDOMPolyfill = window.ShadowDOMPolyfill;
if (!ShadowDOMPolyfill) return;
- if (navigator.userAgent.indexOf('(Dart)') !== -1) {
+ // TODO(sigmund): remove the userAgent check once 1.6 rolls as stable.
+ // See: dartbug.com/18463
+ if (navigator.dartEnabled || (navigator.userAgent.indexOf('(Dart)') !== -1)) {
console.error("ShadowDOMPolyfill polyfill was loaded in Dartium. This " +
"will not work. This indicates that Dartium's Chrome version is " +
"not compatible with this version of web_components.");
« no previous file with comments | « pkg/web_components/CHANGELOG.md ('k') | pkg/web_components/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698