Global

Methods

evaluateDom(root, conditions)

Evaluates a set of conditions on a DOM tree
Parameters:
Name Type Description
root A DOM node corresponding to the root of the page
conditions A list of Function, each corresponding to a Boolean condition to evaluate on the page.
Source:
Returns:
An array of data trees corresponding to the explanation for each condition that evaluates to false.

getVerdict(root, conditions)

Evaluates a single condition on a DOM tree. This is a stub for testing purposes.
Parameters:
Name Type Description
root A DOM node corresponding to the root of the page
conditions A Function that corresponds to a Boolean condition to evaluate on the page.
Source:
Returns:
A data tree explaining the violation of the condition if it evaluates to false, and null if the condition is fulfilled.

same_object(o1, o2)

Checks if two objects are equal. This is a surrogate to simulate the behavior of Object.equals in Java. If the first object has an equals() method, it is called; otherwise, standard equality between JavaScript objects is used.
Parameters:
Name Type Description
o1 The first object
o2 The second object
Source:
Returns:
true if the two objects are equal, false otherwise