Prototype and the Script Loader

2006 August 17
by Ryan

The development branch of WordPress now bundles Prototype 1.5. A number of themes and plugins have been bundling Prototype, so we decided to make it available out-of-the-box. We also use it internally for the new autosave feature.

The development branch also has a nifty script loader from mdawaffe that makes including JS in a cacheable way very easy. For example, if you want to use Prototype in your theme, include it like so:

wp_enqueue_script('prototype');

7 Responses
  1. 2006 August 17

    The script loader works for themes as long as this patch is applied :)

  2. 2006 August 17

    Applied.

  3. 2006 August 18

    This is great. I hope more AJAX plugins make use of this. I have 3 or 4 AJAX plugins now, all of which use slightly different versions of prototype or prototype.lite or moo.fx, so I’m forced to load all of them to avoid breaking the plugins.

Trackbacks & Pingbacks

  1. Abhijit Nadgouda @ iface » To Move Or Not To Move
  2. Standing Tall » Blog Archive » WordPressにPrototype
  3. Ryan Boren: Prototype and the Script Loader at SocialCode
  4. To Move Or Not To Move | iface thoughts

Comments are closed for this entry.