diff --git a/resources/mmv/mmv.base.js b/resources/mmv/mmv.base.js index 97ee0eae2..778e66bcb 100644 --- a/resources/mmv/mmv.base.js +++ b/resources/mmv/mmv.base.js @@ -19,13 +19,15 @@ ( function ( mw ) { mw.mmv = { /** - * Feature-detects OOJS support. OOJS uses es5-shim, and from the remaining ES5 additions - * (the ones provided by es5-sham) the only one it uses is Object.create. + * Feature-detects SVG support. MuyltimediaViewer uses SVG icons extensively and is + * unusable without them. * @member mw.mmv.MultimediaViewer * @return {boolean} */ isBrowserSupported : function () { - return !!Object.create; + // From modernizr 2.6.1 + var ns = { 'svg': 'http://www.w3.org/2000/svg' }; + return !!document.createElementNS && !!document.createElementNS( ns.svg, 'svg' ).createSVGRect; } }; }( mediaWiki ) );