O'Reilly logo

Programming Social Applications by Jonathan LeBlanc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Require/Optional

The Require (must include) and Optional (may include if available) elements denote feature dependencies to be made available to a gadget. Both tags have a single attribute available, feature, whose value denotes the feature that should be included. Within the confines of an OpenSocial gadget, the Require and Optional statements are typically used to indicate feature dependencies such as the OpenSocial version to use (e.g., opensocial-1.0) or library-specific methods like the OpenSocial lightweight JavaScript APIs (e.g., osapi).

Following are some sample Require or Optional elements within the ModulePrefs node:

<ModulePrefs>
   <Require feature="opensocial-0.9"/>
   <Require feature="osapi"/>
   <Require feature="dynamic-height"/>
   <Optional feature="shareable-prefs"/>
</ModulePrefs>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required