mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
25 lines
660 B
JavaScript
25 lines
660 B
JavaScript
/*!
|
|
{
|
|
"name": "createElement with Attributes",
|
|
"property": ["createelementattrs", "createelement-attrs"],
|
|
"tags": ["dom"],
|
|
"builderAliases": ["dom_createElement_attrs"],
|
|
"authors": ["James A. Rosen"],
|
|
"notes": [{
|
|
"name": "Related Github Issue",
|
|
"href": "https://github.com/Modernizr/Modernizr/issues/258"
|
|
}]
|
|
}
|
|
!*/
|
|
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
|
|
Modernizr.addTest('createelementattrs', function() {
|
|
try {
|
|
return createElement('<input name="test" />').getAttribute('name') === 'test';
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}, {
|
|
aliases: ['createelement-attrs']
|
|
});
|
|
});
|