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

execScript() is evil, too

Expand Messages
  • crlender
    Internet Explorer has a window.execScript() method that basically does the same thing as eval(), except that it always executes scripts in the global scope:
    Message 1 of 2 , May 5 11:53 AM
    • 0 Attachment
      Internet Explorer has a window.execScript() method that basically does
      the same thing as eval(), except that it always executes scripts in
      the global scope:

      http://msdn.microsoft.com/en-us/library/ms536420(VS.85).aspx

      Shouldn't jslint flag this as "evil", too?


      - Conrad
    • kevin_hakanson
      ... I had a post on this last year: http://tech.groups.yahoo.com/group/jslint_com/message/93 There is something in the fulljslint.js code for this, but I
      Message 2 of 2 , May 6 11:29 AM
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "crlender" <crlender@...> wrote:
        >
        > Internet Explorer has a window.execScript() method that basically does
        > the same thing as eval(), except that it always executes scripts in
        > the global scope:
        >
        > http://msdn.microsoft.com/en-us/library/ms536420(VS.85).aspx
        >
        > Shouldn't jslint flag this as "evil", too?
        >
        >
        > - Conrad
        >

        I had a post on this last year: http://tech.groups.yahoo.com/group/jslint_com/message/93

        There is something in the fulljslint.js code for this, but I couldn't get it to trigger with the online check.

        if (!option.evil) {
        if (left.value === 'eval' || left.value === 'Function' ||
        left.value === 'execScript') {
        warning("eval is evil.", left);
      Your message has been successfully submitted and would be delivered to recipients shortly.