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

Unified Diff: pkg/polymer/lib/boot.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/polymer/lib/boot.js
diff --git a/pkg/polymer/lib/boot.js b/pkg/polymer/lib/boot.js
index 62d72a7cac5ea429a3d5ae9a6b4fab193d518cdb..b0a4196108617be8d5f84f09dab7f8d2bfd6b719 100644
--- a/pkg/polymer/lib/boot.js
+++ b/pkg/polymer/lib/boot.js
@@ -33,7 +33,10 @@
/// discovered in the HTML document.
(function() {
// Only run in Dartium.
- if (navigator.userAgent.indexOf('(Dart)') === -1) return;
+ if (!navigator.dartEnabled &&
kasperl 2014/08/13 07:29:33 Will we be able to simplify this and get rid of th
vsm 2014/08/13 08:24:06 Yes - this is just precautionary for the transitio
Siggi Cherem (dart-lang) 2014/08/13 16:15:27 Done.
+ (navigator.userAgent.indexOf('(Dart)') === -1)) {
+ return;
+ }
// Extract a Dart import URL from a script tag, which is the 'src' attribute
// of the script tag, or a data-url with the script contents for inlined code.

Powered by Google App Engine
This is Rietveld 408576698