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

33Re: [jslint] Global var...

Expand Messages
  • Douglas Crockford
    Apr 28, 2008
      /*global FOO*/
      FOO = YAHOO.namespace("foo");


      --- On Mon, 4/28/08, santini.alberto <albertosantini@...> wrote:

      > From: santini.alberto <albertosantini@...>
      > Subject: [jslint] Global var...
      > To: jslint_com@yahoogroups.com
      > Date: Monday, April 28, 2008, 9:33 AM
      > Hello.
      >
      > In my javascript files I define, as first line, a namespace
      > like
      >
      > var FOO = YAHOO.namespace("foo"); // alias for
      > YAHOO.foo
      >
      > using Yahoo! User Interface (YUI) library.
      >
      > Of course, JSLint displays "Global var. Use /*global
      > */ instead."
      > message. So far, what is it the good practice?
      >
      > In YUI code, as example, there is only something like
      >
      > YAHOO.namespace("foo");
      >
      > so no clue.
      >
      > Any idea?
      >
      > Thanks in advance,
      > Alberto Santini
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
    • Show all 3 messages in this topic