Loading ...
Sorry, an error occurred while loading the content.

missing 'use strict' on sloppy

Expand Messages
  • Marcos Zanona
    After reading your article I could understand that it is be possible to use both sloppy
    Message 1 of 2 , Jul 14, 2011
    • 0 Attachment
      After reading your
      article<http://www.yuiblog.com/blog/2010/12/14/strict-mode-is-coming-to-town/>
      I
      could understand that it is be possible to use both sloppy and strict
      functions within the same file when using the 'use strict' pragma. however
      the following example still asking for the pragma even on the sloppy
      function.

      (function () {
      "use strict";
      // this function is strict... }());(function () {
      // but this function is sloppy... }());

      When using sloppy: true it doesn't require the pragma at all even for strict
      functions.


      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... All inner functions of a strict function are also strict.
      Message 2 of 2 , Jul 14, 2011
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, Marcos Zanona <marcos@...> wrote:

        > After reading your
        > article<http://www.yuiblog.com/blog/2010/12/14/strict-mode-is-coming-to-town/>
        > I
        > could understand that it is be possible to use both sloppy and strict
        > functions within the same file when using the 'use strict' pragma. however
        > the following example still asking for the pragma even on the sloppy
        > function.
        >
        > (function () {
        > "use strict";
        > // this function is strict... }());(function () {
        > // but this function is sloppy... }());
        >
        > When using sloppy: true it doesn't require the pragma at all even for strict
        > functions.


        All inner functions of a strict function are also strict.
      Your message has been successfully submitted and would be delivered to recipients shortly.