A UWA widget file uses standard XHTML code, except for the preferences section, which uses a specific set of elements. Apart from preferences, the XHTML code is entirely based on Web-standards: XHTML/XML, JavaScript/Ajax, CSS.

The various sections of the XHTML file File header Apart from the Netvibes widget namespace, the header features the usual code from any well-formed XHTML 1.0 Strict files.

Some platforms ask for bigger icons. UWA sets this in the same way as the favicon:

In order to test your UWA locally, you should add these two lines to your HTML header. They will emulate the UWA environment while not in Netvibes - what we call “Standalone mode”.

Once you are done testing, you can leave them in the code: they are ignored by Netvibes or any supported platform.

It is not recommended to use the document and window objects, as well as their methods, properties and events, for portability reasons. Most of these have been duplicated and expanded in the new widget object. Preferences UWA widgets can have user-defined preferences of several types. These preferences are stored on the local platform, and retrieved every time the widget is loaded.

Preferences are based on the UWA-specific widget:preference element, and each preference uses a preferences tag.

There must be only one widget:preferences element per widget in the head portion of the file. There can be as many preference tags as needed, provided they are all within widget:preferences.

preference tags can use the following types (to be set in the “type” attribute of each tag):

Using a preference of type list requires more than three specific attributes, as it does for the range type. The list type requires options, which are to be set like common select/option tags in HTML:

a preference name MUST only contain letters, numbers or underscores - no space. a preference label MUST be unique: no other preference can use that same label. In order to work properly on all platforms:

Body section There is no best way to handle the body section of the XHTML file: developers are free to have their widget start with an empty body, or a fully created one.

Most of the time, developers can rely on this kind of body content:

But another way could be to build a static XHTML skeleton in the body section, and fill the content in using JS/DOM methods.