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

Unified Diff: pkg/browser/lib/dart.js

Issue 463083002: A more robust check for native dart support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed to attribute 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/browser/lib/dart.js
diff --git a/pkg/browser/lib/dart.js b/pkg/browser/lib/dart.js
index f8d686e1ab832e4534b442a34a86ecbaf44f17d6..4dd825d1d14268a8c3db7c966394eba2256fcb31 100644
--- a/pkg/browser/lib/dart.js
+++ b/pkg/browser/lib/dart.js
@@ -4,7 +4,8 @@
(function() {
// Bootstrap support for Dart scripts on the page as this script.
-if (navigator.userAgent.indexOf('(Dart)') === -1) {
+// TODO(18463): Remove user agent check. We will remove 'Dart' from there.
+if (!navigator.dartEnabled && (navigator.userAgent.indexOf('(Dart)') === -1)) {
// TODO:
// - Support in-browser compilation.
// - Handle inline Dart scripts.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698