Creating Google gadgets
Users can create Google gadgets that display on a dashboard. These gadgets are XML text files and must follow the Google gadget specification. After the file is placed on a web server, a dashboard designer can use the file’s URI in an import gadget to make it appear on the dashboard.
A Google gadget file typically includes the following components:
This section avoids XML parsing and the escape of special characters in HTML and JavaScript code.Listing 8-1 shows an example Google gadget that displays HTML content.
Listing 8-1 Example Google gadget displaying HTML codeCSS, HTML, and JavaScript content that normally goes inside BODY tags of an HTML file, can be included in a Google gadget. Google gadgets generate their own HTML, HEAD, and BODY tags so it is not necessary for a gadget designer to use these tags in the gadget. Users can load external files such as JavaScript libraries and images in the gadget by using the URI of the external file.
(c) Copyright Actuate Corporation 2011 |
![]() |