topical media & game development

talk show tell print

#javascript-code-08-namespace.js / js



  // Create a default, global, namespace
  var YAHOO = {};
  
  // Setup some child namespaces, using objects
  YAHOO.util = {};
  
  // Create the final namespace, which contains a property with a function
  YAHOO.util.Event = {
      addEventListener: function(){ ... }
  };
  
  // Call the function within that particular namespace
  YAHOO.util.Event.addEventListener( ... )
  
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.