The GNOME desktop environment's Epiphany Web browser has gained support for developing extensions with JavaScript. This feature was implemented by integrating Seed, a new framework that leverages GObject-introspection to provide JavaScript bindings for the GTK+ toolkit.

I wrote about Seed last month in a hands-on tutorial that demonstrated how to build a simple Twitter search tool with JavaScript. Seed has continued to improve and is becoming more robust. Version 0.5 includes many bug fixes and reduces the memory footprint for some applications.

Some new code examples have been added to the version control system, including some that demonstrate how to use the Clutter graphics library. An improved version of my Twitter search client—with support for displaying profile images—is also included in the examples directory. The examples (and also the unit tests) are a great place to start if you want to learn more about using Seed for your own applications.

One of the most intriguing potential uses for Seed is as an embedded scripting engine for facilitating application plugin development. The first application to achieve Seed extension support is the Epiphany Web browser. The feature landed in a recent revision and can be tested by compiling Epiphany from trunk with the --enable-seed parameter.

Lead Seed developer Robert Carr wrote a blog entry on Sunday that explains how the Epiphany extension system works. Scripts can hook into tab and window objects, manipulate the user interface, and bind functions to various events. GObject-introspection made it easy for the developers to expose the Epiphany API through JavaScript so that it can be used by extension writers. The scripts, and simple config files that include extension metadata, are placed in ~/.gnome2/epiphany/extensions. He has published a few sample extensions to help developers get started.

This kind of scripting capability has the potential to bring enormous advantages to applications. It can be used for extensive user customization, rapid prototyping of new features, automated application testing, and a wide range of other uses. The value of Seed is clearly being recognized by the GNOME developer community and it's possible that we could see it in other applications in the future.