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

Error message for not defined JScript Object

Expand Messages
  • tzvikam@gmail.com
    Hi When using the JSLint to check jscripts, why do I get an error messages for known and defined JScripts objects like ActiveXObject , Enumerator and for
    Message 1 of 5 , Mar 22, 2010
    • 0 Attachment
      Hi

      When using the JSLint to check jscripts, why do I get an error messages for known and defined JScripts objects like 'ActiveXObject', 'Enumerator' and for the 'WScript'/'CScript' Objects ?

      Douglas, Can you add an option that 'knows' that objects ?

      Best regards
      Tzvika
    • Douglas Crockford
      ... Those things are not formally a part of ECMAScript and so should not be there by default because they are a portability hazard. ... Can you give me a
      Message 2 of 5 , Mar 22, 2010
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, tzvikam@... wrote:
        > When using the JSLint to check jscripts, why do I get an error
        > messages for known and defined JScripts objects like 'ActiveXObject',
        > 'Enumerator' and for the 'WScript'/'CScript' Objects ?

        Those things are not formally a part of ECMAScript and so should not be there by default because they are a portability hazard.

        > Douglas, Can you add an option that 'knows' that objects ?

        Can you give me a complete list?
      • Michael Mikowski
        You might add those to a global comment, e.g, at the top of your script: /*global ActiveXObject Enumerator WScript CScript */ and then jslint won t complain.
        Message 3 of 5 , Mar 22, 2010
        • 0 Attachment
          You might add those to a global comment, e.g, at the top of your script:

          /*global ActiveXObject Enumerator WScript CScript */

          and then jslint won't complain. That said, those all look IE specific. Have you considered using a cross-browser framework like jquery to help get what you need?


          This may also help:

          /*jslint browser: true */





          ________________________________
          From: "tzvikam@..." <tzvikam@...>
          To: jslint_com@yahoogroups.com
          Sent: Mon, March 22, 2010 12:47:26 AM
          Subject: [jslint] Error message for not defined JScript Object


          Hi

          When using the JSLint to check jscripts, why do I get an error messages for known and defined JScripts objects like 'ActiveXObject' , 'Enumerator' and for the 'WScript'/'CScript' Objects ?

          Douglas, Can you add an option that 'knows' that objects ?

          Best regards
          Tzvika




          [Non-text portions of this message have been removed]
        • tzvikam@gmail.com
          ... Well, the complete list of the non-standard objects (taken from Microsoft Help File) is: WScript CScript ActiveXObject Debug Enumerator VBArray
          Message 4 of 5 , Mar 23, 2010
          • 0 Attachment
            --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:
            >
            > --- In jslint_com@yahoogroups.com, tzvikam@ wrote:
            > > When using the JSLint to check jscripts, why do I get an error
            > > messages for known and defined JScripts objects like 'ActiveXObject',
            > > 'Enumerator' and for the 'WScript'/'CScript' Objects ?
            >
            > Those things are not formally a part of ECMAScript and so should not be there by default because they are a portability hazard.
            >
            > > Douglas, Can you add an option that 'knows' that objects ?
            >
            > Can you give me a complete list?
            >
            Well, the complete list of the non-standard objects (taken from Microsoft Help File) is:
            WScript
            CScript
            ActiveXObject
            Debug
            Enumerator
            VBArray
          • tzvikam@gmail.com
            Thanks, I will... BTW, I m using JScript as a scripting language for automatic testing on a windows machine, and not for Web programming. That s why I need
            Message 5 of 5 , Mar 23, 2010
            • 0 Attachment
              Thanks, I will...

              BTW, I'm using JScript as a scripting language for automatic testing on a windows machine, and not for Web programming.
              That's why I need these 'ActiveXObject' and 'WScript' objects, to connect to some special COM object.

              --- In jslint_com@yahoogroups.com, Michael Mikowski <z_mikowski@...> wrote:
              >
              > You might add those to a global comment, e.g, at the top of your script:
              >
              > /*global ActiveXObject Enumerator WScript CScript */
              >
              > and then jslint won't complain. That said, those all look IE specific. Have you considered using a cross-browser framework like jquery to help get what you need?
              >
              >
              > This may also help:
              >
              > /*jslint browser: true */
              >
              >
              >
              >
              >
              > ________________________________
              > From: "tzvikam@..." <tzvikam@...>
              > To: jslint_com@yahoogroups.com
              > Sent: Mon, March 22, 2010 12:47:26 AM
              > Subject: [jslint] Error message for not defined JScript Object
              >
              >
              > Hi
              >
              > When using the JSLint to check jscripts, why do I get an error messages for known and defined JScripts objects like 'ActiveXObject' , 'Enumerator' and for the 'WScript'/'CScript' Objects ?
              >
              > Douglas, Can you add an option that 'knows' that objects ?
              >
              > Best regards
              > Tzvika
              >
              >
              >
              >
              > [Non-text portions of this message have been removed]
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.