Appendix C. Sample Wave Embed Code

The following is the complete, uninterrupted source code for the wave embed examples covered in Chapter 8.

Enabling the Google Wave Toolbar in an Embedded Wave

You can browse or check out the source code from http://code.google.com/p/google-wave-embed-examples.

Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Wave Embed Example</title> <script src="http://wave-api.appspot.com/public/embed.js" type="text/javascript"></script> <style type="text/css"> body { font-family: arial, verdana, sans-serif; } #container { background: #fafafa; border: 1px solid #748F8A; height: 100%; padding: 10px; width: 100%; } #wrapper { color: #333333; height: 350px; margin: 0px auto; width: 500px; } </style> <script type="text/javascript"> var waveUrl = 'https://wave.google.com/wave/'; var waveId = 'googlewave.com!w+bvQu5APyH'; var waveContainer; function load() { waveContainer = new WavePanel(waveUrl); waveContainer.setUIConfig('#ffffff', '#333333', 'Arial', '10pt'); waveContainer.loadWave(waveId); waveContainer.init(document.getElementById('container'), showToolbar); } function showToolbar() { waveContainer.setToolbarVisible(true); } </script> </head> <body onLoad="load()"> <div id="wrapper"> <h2>Wave Embed Example #1</h2> <h3>Showing the Google Wave Toolbar</h3> <div id="container"></div> ...

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.