| 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 3b766c227f11ab39fb882afa5c599dd776025567..d8dfd96c9a5a55697178c5bf34c076dd7ccc1ffd 100644
|
| --- a/pkg/dev_compiler/lib/js/legacy/dart_library.js
|
| +++ b/pkg/dev_compiler/lib/js/legacy/dart_library.js
|
| @@ -135,9 +135,16 @@ var dart_library =
|
| // Expose constructors for DOM types dart:html needs to assume are
|
| // available on window.
|
| if (typeof PannerNode == "undefined") {
|
| - let audioContext = new AudioContext();
|
| + 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;
|
| - window.StereoPannerNode = audioContext.createStereoPanner().constructor;
|
| }
|
| if (typeof AudioSourceNode == "undefined") {
|
| window.AudioSourceNode = MediaElementAudioSourceNode.constructor;
|
| @@ -146,14 +153,18 @@ var dart_library =
|
| window.FontFaceSet = document.fonts.__proto__.constructor;
|
| }
|
| if (typeof MemoryInfo == "undefined") {
|
| - window.MemoryInfo = window.performance.memory.constructor;
|
| + 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');
|
| - window.Animation = d.animate(d).constructor;
|
| + if (typeof d.animate != "undefined") {
|
| + window.Animation = d.animate(d).constructor;
|
| + }
|
| }
|
| if (typeof SourceBufferList == "undefined") {
|
| window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
|
|
|