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

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
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..8c0a6714b94aa8ecef989e961a96951a4abc655e 100644
--- a/pkg/web_components/lib/dart_support.js
+++ b/pkg/web_components/lib/dart_support.js
@@ -7,7 +7,7 @@
var ShadowDOMPolyfill = window.ShadowDOMPolyfill;
if (!ShadowDOMPolyfill) return;
- if (navigator.userAgent.indexOf('(Dart)') !== -1) {
+ if (navigator.dartEnabled || (navigator.userAgent.indexOf('(Dart)') !== -1)) {
kasperl 2014/08/13 07:29:33 Same question.
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.");

Powered by Google App Engine
This is Rietveld 408576698