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

Re: [jslint] window

Expand Messages
  • AJ ONeal
    I use this pattern: https://github.com/coolaj86/require-kiss-js I m also going to look into RequireJS in the near future. AJ ONeal ... [Non-text portions of
    Message 1 of 9 , Mar 31, 2011
    • 0 Attachment
      I use this pattern:
      https://github.com/coolaj86/require-kiss-js

      I'm also going to look into RequireJS in the near future.

      AJ ONeal

      On Tue, Mar 29, 2011 at 5:17 PM, Erik Eckhardt <erik@...> wrote:

      > If you were creating a specialized code library, what method would you use
      > to "namespace" all the functions in use by that library? Since functions
      > are
      > themselves globals, would you just create a single "master" object, itself
      > global, with all other variables inside of it? Then, in commons use, either
      > use this.fn() or libraryname.fn() all over the place instead of just fn()
      > when you want to use a function? And something similar for any variables
      > that are needed to control the operation of the code library (say it's a
      > popup widget that needs to keep track of all the open popups and whether a
      > particular popup template has been loaded via ajax or not)?
      >
      > On Tue, Mar 29, 2011 at 8:57 AM, Douglas Crockford <douglas@...
      > >wrote:
      >
      > >
      > >
      > > --- In jslint_com@yahoogroups.com, Erik Eckhardt <erik@...> wrote:
      > >
      > > > Is there some place an interested person could read about the good vs.
      > > bad
      > > > uses of `window`?
      > >
      > > The principle misuse is to access global variables. Global variables
      > should
      > > be avoided.
      > >
      > >
      > >
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.