performance.js 663 B

1234567891011121314151617181920212223
  1. /*!
  2. {
  3. "name": "Navigation Timing API",
  4. "property": "performance",
  5. "caniuse": "nav-timing",
  6. "tags": ["performance"],
  7. "authors": ["Scott Murphy (@uxder)"],
  8. "notes": [{
  9. "name": "W3C Spec",
  10. "href": "https://www.w3.org/TR/navigation-timing/"
  11. },{
  12. "name": "HTML5 Rocks Tutorial",
  13. "href": "https://www.html5rocks.com/en/tutorials/webperformance/basics/"
  14. }],
  15. "polyfills": ["perfnow"]
  16. }
  17. !*/
  18. /* DOC
  19. Detects support for the Navigation Timing API, for measuring browser and connection performance.
  20. */
  21. define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
  22. Modernizr.addTest('performance', !!prefixed('performance', window));
  23. });