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 ) {
|
( function ( mw ) {
|
||||||
mw.mmv = {
|
mw.mmv = {
|
||||||
/**
|
/**
|
||||||
* Feature-detects OOJS support. OOJS uses es5-shim, and from the remaining ES5 additions
|
* Feature-detects SVG support. MuyltimediaViewer uses SVG icons extensively and is
|
||||||
* (the ones provided by es5-sham) the only one it uses is Object.create.
|
* unusable without them.
|
||||||
* @member mw.mmv.MultimediaViewer
|
* @member mw.mmv.MultimediaViewer
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
isBrowserSupported : function () {
|
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 ) );
|
}( mediaWiki ) );
|
||||||
|
|
Loading…
Reference in a new issue