Skip to content

Prototype and the Script Loader

August 17, 2006
by Ryan Boren

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 Comments
  1. August 17, 2006 9:20 pm

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

  2. August 17, 2006 9:24 pm

    Applied.

  3. August 18, 2006 2:20 am

    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

  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.