mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +00:00
Merge "Feature detection for MV load: add SVG, remove Object.create"
This commit is contained in:
commit
01e05f07bf
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue