customevent.js 581 B

123456789101112131415161718192021222324
  1. /*!
  2. {
  3. "name": "CustomEvent",
  4. "property": "customevent",
  5. "tags": ["customevent"],
  6. "authors": ["Alberto Elias"],
  7. "notes": [{
  8. "name": "W3C Spec",
  9. "href": "https://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent"
  10. }, {
  11. "name": "MDN Docs",
  12. "href": "https://developer.mozilla.org/en/docs/Web/API/CustomEvent"
  13. }],
  14. "polyfills": ["eventlistener"]
  15. }
  16. !*/
  17. /* DOC
  18. Detects support for CustomEvent.
  19. */
  20. define(['Modernizr'], function(Modernizr) {
  21. Modernizr.addTest('customevent', 'CustomEvent' in window && typeof window.CustomEvent === 'function');
  22. });