Index: pkg/analyzer/doc/support/dart.js |
diff --git a/pkg/browser/lib/dart.js b/pkg/analyzer/doc/support/dart.js |
similarity index 60% |
copy from pkg/browser/lib/dart.js |
copy to pkg/analyzer/doc/support/dart.js |
index b1f97b1804b6cf57edc33768bcad8523ddb4a23f..f8d686e1ab832e4534b442a34a86ecbaf44f17d6 100644 |
--- a/pkg/browser/lib/dart.js |
+++ b/pkg/analyzer/doc/support/dart.js |
@@ -4,8 +4,7 @@ |
(function() { |
// Bootstrap support for Dart scripts on the page as this script. |
-// TODO(18463): Remove user agent check. We will remove 'Dart' from there. |
-if (!navigator.dartEnabled && (navigator.userAgent.indexOf('(Dart)') === -1)) { |
+if (navigator.userAgent.indexOf('(Dart)') === -1) { |
// TODO: |
// - Support in-browser compilation. |
// - Handle inline Dart scripts. |
@@ -26,22 +25,6 @@ if (!navigator.dartEnabled && (navigator.userAgent.indexOf('(Dart)') === -1)) { |
// than one script. |
document.currentScript = script; |
parent.replaceChild(script, scripts[i]); |
- |
- // Support for incremental compilation. |
- script.onload = function (event) { |
- var script = event.target; |
- if (self.$dart_unsafe_incremental_support) { |
- new WebSocket(script.src.replace(/^http/, 'ws')).onmessage = |
- function (event) { |
- var patch = String(event.data); |
- self.$dart_unsafe_incremental_support.patch(patch); |
- script.dispatchEvent( |
- new CustomEvent( |
- "dart_program_updated", |
- { bubbles: true, detail: { patch: patch } })); |
- }; |
- } |
- }; |
} |
} |
} |