Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature-detect for VML #1037

Merged
merged 1 commit into from
Oct 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feature-detect for VML
Detect if VML (Vector Markup Language) is supported.
  • Loading branch information
candrews committed Oct 4, 2013
commit 4eb425f889ccde6a155c86ea605f17ef22db1bda
24 changes: 24 additions & 0 deletions feature-detects/vml.js
Original file line number Diff line number Diff line change
@@ -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 = '<v:shape id="vml_flag1" adj="1" />';
var shape = containerDiv.firstChild;
shape.style.behavior = "url(#default#VML)";
var supportsVml = shape ? typeof shape.adj == "object": true;
return supportsVml;
});
});