Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

Squish Class Reference

Object providing JavaScript API for extensions. More...

List of all members.

Static Public Member Functions

static registerWidget (args)
static addEventObjectHook (f)
static addTypeOfHook (f)
static addNameOfHook (f)
static addMatchObjectHook (f)
static Boolean hasClassName (o, cls)
static String cleanString (s)
static String nameOf (o)
static HTMLElement getElementByClassName (context, className, tagName)
static Array getElementsByClassName (context, className, tagName)
static String propertiesToName (o, props)
static String uniquifyName (n, o)
static String createItemName (object, itemName)
static Boolean matchProperty (prop, value)
static mouseClick (o, ctrl, shift, alt, x, y)


Detailed Description

Object providing JavaScript API for extensions.

The Squish object provides the API necessary to extend Squish for Web to recognize custom AJAX/JavaScript/DHTML widgets. This way Squish can work on high-level custom widgets instead of working on the low-level DOM objects.

This mechanism allows to create robust high-level tests.


Member Function Documentation

Squish::addEventObjectHook  )  [static]
 

Registers the function f as handler function when finding the real object of an event.

Squish::addMatchObjectHook  )  [static]
 

Registers the function f as handler function to be called when identifying an object by properties.

Squish::addNameOfHook  )  [static]
 

Registers the function f as handler function when finding the multi-property name of a DOM object.

Squish::addTypeOfHook  )  [static]
 

Registers the function f as handler function when finding the high-level type of a DOM object.

String Squish::cleanString  )  [static]
 

Returns a cleaned string (stripped white spaces, etc.) of s.

String Squish::createItemName object  ,
itemName 
[static]
 

Returns the name of the item itemName on the container object object in an internal format as used internally by Squish.

HTMLElement Squish::getElementByClassName context  ,
className  ,
tagName 
[static]
 

Returns the first element matching the given className and tagName relative to the specified context node.

Array Squish::getElementsByClassName context  ,
className  ,
tagName 
[static]
 

Returns an array of elements matching the given className and tagName relative to the specified context node.

Boolean Squish::hasClassName ,
cls 
[static]
 

Returns whether the object o is of class cls.

Boolean Squish::matchProperty prop  ,
value 
[static]
 

Returns whether the property prop matches the given value. prop is of the format {value: string, modifiers: Number}. This function does the correct matching (strict, regex, etc.) depending on the prop.modifiers flag.

You should use this function in your matchObject implementation instead of doing a comparison.

Squish::mouseClick ,
ctrl  ,
shift  ,
alt  ,
,
[static]
 

Sends a click event on the object o using the modifiers at the specified relative position. The modifier keys and relative coordinates are optional and don't need to be specified.

String Squish::nameOf  )  [static]
 

Returns the multi-property name of the object o. Might call a registered name hook so be careful when calling this from your custom name hook handler.

String Squish::propertiesToName ,
props 
[static]
 

Returns a string containing a list of property='value' pairs for the object o. props specifies the properties to be used.

Squish::registerWidget args   )  [static]
 

This function registers a DOM object type as simple widget which Squish should record events on. args is of the format {Key: value, ....}.

Supported keys:

  • Event (String): Specifies which events should be recorded such as mousedown.

  • Class (String): The class name (className property) of the DOM objects which Squish should recognize as widget.


Generated on Mon Jun 11 15:49:45 2007 for Squish HTML API by  doxygen 1.4.4