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

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
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/boot.js
diff --git a/pkg/polymer/lib/boot.js b/pkg/polymer/lib/boot.js
index 62d72a7cac5ea429a3d5ae9a6b4fab193d518cdb..419ebb12ea8a2e67c60addbbce8a053f5c327bd5 100644
--- a/pkg/polymer/lib/boot.js
+++ b/pkg/polymer/lib/boot.js
@@ -33,7 +33,12 @@
/// discovered in the HTML document.
(function() {
// Only run in Dartium.
- if (navigator.userAgent.indexOf('(Dart)') === -1) return;
+ if (!navigator.dartEnabled &&
+ // TODO(sigmund): remove userAgent check once 1.6 rolls as stable.
+ // See: dartbug.com/18463
+ (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.
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698