diff --git a/feature-detects/vml.js b/feature-detects/vml.js new file mode 100644 index 0000000000..d46dd8b021 --- /dev/null +++ b/feature-detects/vml.js @@ -0,0 +1,24 @@ +/*! +{ + "name": "VML", + "property": "vml", + "caniuse": "vml", + "tags": ["vml"], + "authors": ["Craig Andrews (@candrews)"] +} +!*/ +/* DOC + +Detects support for VML. + +*/ +define(['Modernizr', 'createElement'], function( Modernizr, createElement ) { + Modernizr.addTest('vml', function() { + var containerDiv = createElement('div'); + containerDiv.innerHTML = ''; + var shape = containerDiv.firstChild; + shape.style.behavior = "url(#default#VML)"; + var supportsVml = shape ? typeof shape.adj == "object": true; + return supportsVml; + }); +});