mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 23:21:04 +00:00
20 lines
619 B
JavaScript
20 lines
619 B
JavaScript
/*!
|
|
{
|
|
"name": "a[download] Attribute",
|
|
"property": "adownload",
|
|
"caniuse": "download",
|
|
"tags": ["media", "attribute"],
|
|
"builderAliases": ["a_download"],
|
|
"notes": [{
|
|
"name": "WHATWG Spec",
|
|
"href": "https://developers.whatwg.org/links.html#downloading-resources"
|
|
}]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
When used on an `<a>`, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigating to it.
|
|
*/
|
|
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
|
|
Modernizr.addTest('adownload', !window.externalHost && 'download' in createElement('a'));
|
|
});
|