| Index: lib/runtime/dart_library.js
|
| diff --git a/lib/runtime/dart_library.js b/lib/runtime/dart_library.js
|
| index 1f0eb834d8ce1af62fa117fddacd4588de5e2c68..d7ac9a3c271ed2c0e6a731e33e6f0f4ce8d95de9 100644
|
| --- a/lib/runtime/dart_library.js
|
| +++ b/lib/runtime/dart_library.js
|
| @@ -115,6 +115,35 @@ var dart_library =
|
| 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 = new AudioContext();
|
| + window.PannerNode = audioContext.createPanner().constructor;
|
| + window.StereoPannerNode = audioContext.createStereoPanner().constructor;
|
| + }
|
| + if (typeof AudioSourceNode == "undefined") {
|
| + window.AudioSourceNode = MediaElementAudioSourceNode.constructor;
|
| + }
|
| + if (typeof FontFaceSet == "undefined") {
|
| + window.FontFaceSet = document.fonts.__proto__.constructor;
|
| + }
|
| + if (typeof MemoryInfo == "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 WebGLVertexArrayObjectOES == "undefined") {
|
| + window.WebGLVertexArrayObjectOES = document.createElement('canvas')
|
| + .getContext('webgl')
|
| + .getExtension("OES_vertex_array_object")
|
| + .createVertexArrayOES().constructor;
|
| + }
|
| }
|
|
|
| // This import is only needed for chrome debugging. We should provide an
|
|
|