drupal.js

Events happening in the community are now at Drupal community events on www.drupal.org.
kkaefer's picture

Idea: General structure of the new drupal.js

Some of my ideas for the future drupal.js:

Note: This is demo/fake code, not actual, working code.

var Drupal = {
  jsEnabled: false,
  basePath: 'http://example.com/drupal',
  locales: {},
  settings: {},
  
  addLocales: function(translations) { ... },
  t: function(str, args) { ... },
  watchdog: function(type, message, severity, link) { ... },
  parseJson: function(data) { ... }
};

jQuery.dimensions = function() { ... };
jQuery.absolutePosition = function() { ... };
jQuery.freezeHeight = function() { ... };
jQuery.redirectFormButton = function() { ... };
Read more
Subscribe with RSS Syndicate content