-
Notifications
You must be signed in to change notification settings - Fork 1
Javascript
sinsunsan edited this page Oct 29, 2012
·
49 revisions
-
debug javascipt http://api.drupal.org/api/drupal/developer!topics!javascript_startup_guide.html/6#oop
-
Example of an object initialization
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} };In this code, Drupal is an Object declared to be equal to itself, or, if not yet set, equal to { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} } which is an Object containing 4 methods (settings, behaviors, themes, and locale) each of which is itself an Object. This line of code is an Object Initializer.