strictmode.js 517 B

1234567891011121314151617181920
  1. /*!
  2. {
  3. "name": "ES5 Strict Mode",
  4. "property": "strictmode",
  5. "caniuse": "use-strict",
  6. "notes": [{
  7. "name": "ECMAScript 5.1 Language Specification",
  8. "href": "https://www.ecma-international.org/ecma-262/5.1/"
  9. }],
  10. "authors": ["@kangax"],
  11. "tags": ["es5"],
  12. "builderAliases": ["es5_strictmode"]
  13. }
  14. !*/
  15. /* DOC
  16. Check if browser implements ECMAScript 5 Object strict mode.
  17. */
  18. define(['Modernizr'], function(Modernizr) {
  19. Modernizr.addTest('strictmode', (function() {'use strict'; return !this; })());
  20. });