Wave Embed API Fundamentals

As you’ve seen in the preceding examples, the Wave Embed API is a relatively lightweight JavaScript API that allows for waves to be embedded in web pages. Although this API is not as rich as the other Robots and Gadgets APIs, it’s important to remember that the API does have quite a bit of utility in terms of allowing waves to be accessed in just about any web page.

If Google Wave becomes a ubiquitous platform, there is great potential for embedded waves to offer a seamless experience for users to participate in waves in a variety of ways. Waves could be used as universal commenting systems on blogs or as dynamic wikis for relatively static websites.

Embedding Waves

The anatomy of an embedded wave is simple. The embedded wave exists as an <iframe> in a parent HTML element that serves as the container for the embedded wave.

The Wave Embed API is loaded by referencing the http://wave-api.appspot.com/public/embed.js JavaScript library on the web page that will include the embedded wave. The library is not versioned currently, although it is possible that different versions may be available as the API is expanded (in much the same way that the Google Maps API offers stable and latest versions).

The core class used for embedding waves is the WavePanel class. It is a constructor that is used to create a new instance of the WavePanel object, which essentially defines the embedded wave. A specific wave is loaded into the WavePanel object using the loadWave method, ...

Get Google Wave: Up and Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.