Web Gadget SDK Web Gadget SDK
[Back to Web Gadget API Reference]
Web.Flags Class
Class used to define flag objects. A flag object is an enumeration of name/value pairs.
create Method
Creates and returns a flag object. When creating a new flag enumeration, use alternating values for the enumeration name and the flag value.
Syntax
Web.Flags.create(strName1, objVal1, strName2, objVal2, ...)
Parameters
Parameter Description
strNameN Name for the flag enumeration element.
objValueN Value for the flag enumeration element.
Return Value
Flag enumeration object containing the specified values as the elements with the specified names.
Example
The following example illustrate how to create and use a Flags object.
var objA = new Object();
var objB = new Object();

var flags = Web.Flags.create("A", objA, "B", objB);

// This will show "true"
alert(flags.A == objA);

// This will show "true"
alert(flags.B == objB);