diff --git a/feature-detects/a/aping.js b/feature-detects/a/aping.js new file mode 100644 index 0000000000..70a887a3a0 --- /dev/null +++ b/feature-detects/a/aping.js @@ -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')); +}); diff --git a/feature-detects/a/areaping.js b/feature-detects/a/areaping.js new file mode 100644 index 0000000000..1a84d5e0a2 --- /dev/null +++ b/feature-detects/a/areaping.js @@ -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')); +}); diff --git a/lib/config-all.json b/lib/config-all.json index aecc71e4ee..f2e0c7fc3d 100644 --- a/lib/config-all.json +++ b/lib/config-all.json @@ -24,6 +24,8 @@ ], "feature-detects": [ "a/download", + "a/aping", + "a/areaping", "ambientlight", "applicationcache", "audio", diff --git a/test/browser/integration/caniuse.js b/test/browser/integration/caniuse.js index 5330dc386d..7a75c3e524 100644 --- a/test/browser/integration/caniuse.js +++ b/test/browser/integration/caniuse.js @@ -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',