Files
Modernizr/feature-detects/mathml.js
Nick a747f33b2b Issue 2338 - Cleanup JSdoc (#2368)
* Convert jsdoc HTTP to HTTPS (#2338)

Convert http -> https in JSDocs.

* Finish checking http hyperlinks in jsDocs

- Links in jsDocs that are working but do not have HTTPS are left as is.
- Dead links are replaced with archived links if obtainable, otherwise new links with similar information.

* Fixes to some HTTPS Links

- Fixing comments
- Pointing to archived links
- Replacing with new links

* Fixing HTTPS:// links in jsDocs

- Unify WFC comment name
- Change some links to new redirected links
- Change some links to acrhived links

* Changing old links to new redirected links

* Updates for pull request

- Fix missing square bracket
- Update generic names (i.e. WHATWG, MDN, Html5 Rocks)
- Update archive links to most recent working links
- Point link to direct issue for oninput.js
2018-10-20 12:18:47 +02:00

34 lines
945 B
JavaScript

/*!
{
"name": "MathML",
"property": "mathml",
"caniuse": "mathml",
"authors": ["Addy Osmani", "Davide P. Cervone", "David Carlisle"],
"knownBugs": ["Firefox < 4 will likely return a false, however it does support MathML inside XHTML documents"],
"notes": [{
"name": "W3C Spec",
"href": "https://www.w3.org/Math/"
}],
"polyfills": ["mathjax"]
}
!*/
/* DOC
Detects support for MathML, for mathematic equations in web pages.
*/
define(['Modernizr', 'testStyles'], function(Modernizr, testStyles) {
// Based on work by Davide (@dpvc) and David (@davidcarlisle)
// in https://github.com/mathjax/MathJax/issues/182
Modernizr.addTest('mathml', function() {
var ret;
testStyles('#modernizr{position:absolute;display:inline-block}', function(node) {
node.innerHTML += '<math><mfrac><mi>xx</mi><mi>yy</mi></mfrac></math>';
ret = node.offsetHeight > node.offsetWidth;
});
return ret;
});
});