Methods
-
addMenuItem(label, listener, opt)
-
Adds a menu item to the menu
Parameters:
Name Type Description labelhtml The test html label for the menu item
listenerfunction The click event handler when the html element is clicked
optJson A plain json object, containing optional style properties for the label.
Example: { 'width':'100px','fontSize':'20px'}Returns:
- Type
- void
-
simpleHash(strVal)
-
Generates a simple hash code (number) prefixed with the string 'hash-'.
Parameters:
Name Type Description strValString The string value to be hashed.
Returns:
The hash code prefixed with the string 'hash-'. If input string is empty then
'hash-0' is returned.- Type
- String