Rendering the Results
To render a web page from the results, we need to start with an HTML file and include the GoogleAPI.js file. Because the GoogleAPI object is self-contained, there are no other files that need to be included, but we do need to create the div element with the gimages id so that the object knows where to write the HTML (Listing 3).
Listing 3The HTML file is used as the web page where the GoogleAPI object renders the widget (index.html)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/
You’ll also notice that I’ve included a CSS file called googleapi.css. The nice thing about creating a custom widget is that you can create your own HTML layout and use your own CSS for the design.