Skip to content

Commit

Permalink
Add feature detect for Event listeners
Browse files Browse the repository at this point in the history
Added MIT licence as advised by @patrickkettner
  • Loading branch information
triblondon committed Feb 17, 2014
1 parent f53a3cc commit d480248
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions feature-detects/eventlistener.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*!
{
"name": "Event Listener",
"property": "eventlistener",
"authors": ["Andrew Betts (@triblondon)"],
"notes": [{
"name": "W3C Spec",
"href": "http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Registration-interfaces"
}],
"polyfills": ["eventlistener"]
}
!*/
/* DOC
Detects native support for addEventListener
*/
define(['Modernizr'], function( Modernizr ) {
Modernizr.addTest('eventlistener', 'addEventListener' in window);
});
6 changes: 6 additions & 0 deletions lib/polyfills.json
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@
"href": "http://remysharp.com/2008/06/30/maxlength-plugin/",
"licenses": ["CC SA"]
},
"eventlistener": {
"name": "EventListener",
"authors": ["Jonathan Neal"],
"href": "https://github.com/jonathantneal/EventListener",
"licenses": ["MIT"]
},
"es6promises": {
"name": "ES6-Promises",
"authors": ["Jake Archibald"],
Expand Down

0 comments on commit d480248

Please sign in to comment.