mirror of
https://github.com/Modernizr/Modernizr.git
synced 2026-01-09 23:57:57 -05:00
Add a|area[ping] detection (#2671)
* Add a|area[ping] detect * add aping|areaping to integration tests * Add author tag
This commit is contained in:
20
feature-detects/a/aping.js
Normal file
20
feature-detects/a/aping.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
{
|
||||
"name": "a[ping] Attribute",
|
||||
"property": "aping",
|
||||
"caniuse": "ping",
|
||||
"tags": ["media", "attribute"],
|
||||
"builderAliases": ["a_ping"],
|
||||
"authors": ["Hélio Correia (@heliocorreia)"],
|
||||
"notes": [{
|
||||
"name": "WHATWG Spec",
|
||||
"href": "https://html.spec.whatwg.org/dev/links.html#ping"
|
||||
}]
|
||||
}
|
||||
!*/
|
||||
/* DOC
|
||||
The ping attribute, if present, gives the URLs of the resources that are interested in being notified if the user follows the hyperlink.
|
||||
*/
|
||||
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
|
||||
Modernizr.addTest('aping', !window.externalHost && 'ping' in createElement('a'));
|
||||
});
|
||||
20
feature-detects/a/areaping.js
Normal file
20
feature-detects/a/areaping.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
{
|
||||
"name": "area[ping] Attribute",
|
||||
"property": "areaping",
|
||||
"caniuse": "ping",
|
||||
"tags": ["media", "attribute"],
|
||||
"builderAliases": ["area_ping"],
|
||||
"authors": ["Hélio Correia (@heliocorreia)"],
|
||||
"notes": [{
|
||||
"name": "WHATWG Spec",
|
||||
"href": "https://html.spec.whatwg.org/dev/links.html#ping"
|
||||
}]
|
||||
}
|
||||
!*/
|
||||
/* DOC
|
||||
The ping attribute, if present, gives the URLs of the resources that are interested in being notified if the user follows the hyperlink.
|
||||
*/
|
||||
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
|
||||
Modernizr.addTest('areaping', !window.externalHost && 'ping' in createElement('area'));
|
||||
});
|
||||
@@ -24,6 +24,8 @@
|
||||
],
|
||||
"feature-detects": [
|
||||
"a/download",
|
||||
"a/aping",
|
||||
"a/areaping",
|
||||
"ambientlight",
|
||||
"applicationcache",
|
||||
"audio/audio",
|
||||
|
||||
@@ -18,6 +18,8 @@ window.caniusecb = function(caniuse) {
|
||||
// the feature detect docs
|
||||
var map = {
|
||||
adownload: 'download',
|
||||
aping: 'ping',
|
||||
areaping: 'ping',
|
||||
ambientlight: 'ambient-light',
|
||||
apng: 'apng',
|
||||
appearance: 'css-appearance',
|
||||
|
||||
Reference in New Issue
Block a user