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

Unified Diff: pkg/dev_compiler/lib/js/legacy/dart_library.js

Issue 2649613003: Fix for Animation and other polyfills (Closed)
Patch Set: Created 3 years, 11 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/dev_compiler/lib/js/legacy/dart_library.js
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_library.js b/pkg/dev_compiler/lib/js/legacy/dart_library.js
index 3b89a88a8f472e2ddcbac5367dbadb8ab3979cd9..e94086395b284bdf154bc181e953600bffb31ff6 100644
--- a/pkg/dev_compiler/lib/js/legacy/dart_library.js
+++ b/pkg/dev_compiler/lib/js/legacy/dart_library.js
@@ -140,54 +140,6 @@ dart_library =
// Force import of core.
var dart_sdk = import_('dart_sdk');
- // TODO(vsm): Move this to a shared location:
- // https://github.com/dart-lang/sdk/issues/27605
- if (typeof NodeList !== "undefined") {
- // TODO(vsm): Do we still need these?
- NodeList.prototype.get = function(i) { return this[i]; };
- NamedNodeMap.prototype.get = function(i) { return this[i]; };
- DOMTokenList.prototype.get = function(i) { return this[i]; };
- HTMLCollection.prototype.get = function(i) { return this[i]; };
-
- // Expose constructors for DOM types dart:html needs to assume are
- // available on window.
- if (typeof PannerNode == "undefined") {
- let audioContext;
- if (typeof AudioContext == "undefined" &&
- (typeof webkitAudioContext != "undefined")) {
- audioContext = new webkitAudioContext();
- } else {
- audioContext = new AudioContext();
- window.StereoPannerNode =
- audioContext.createStereoPanner().constructor;
- }
- window.PannerNode = audioContext.createPanner().constructor;
- }
- if (typeof AudioSourceNode == "undefined") {
- window.AudioSourceNode = MediaElementAudioSourceNode.constructor;
- }
- if (typeof FontFaceSet == "undefined") {
- window.FontFaceSet = document.fonts.__proto__.constructor;
- }
- if (typeof MemoryInfo == "undefined") {
- if (typeof window.performance.memory != "undefined") {
- window.MemoryInfo = window.performance.memory.constructor;
- }
- }
- if (typeof Geolocation == "undefined") {
- navigator.geolocation.constructor;
- }
- if (typeof Animation == "undefined") {
- let d = document.createElement('div');
- if (typeof d.animate != "undefined") {
- window.Animation = d.animate(d).constructor;
- }
- }
- if (typeof SourceBufferList == "undefined") {
- window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
- }
- }
-
// This import is only needed for chrome debugging. We should provide an
// option to compile without it.
dart_sdk._debugger.registerDevtoolsFormatter();

Powered by Google App Engine
This is Rietveld 408576698