B2G/gecko/content/test/unit/test_isequalnode.js
/**
 * Compares the first and third (zero-indexed) child nodes of the element
 * (typically to allow whitespace) referenced by parentId for isEqualNode
 * equality or inequality based on the value of areEqual.
 *
 * Note that this means that the contents of the element referenced by parentId
 * are whitespace-sensitive, and a stray space introduced during an edit to the
 * file could result in a correct but unexpected (in)equality failure.
 */
Compares the first and third (zero-indexed) child nodes of the element
(typically to allow whitespace) referenced by parentId for isEqualNode
equality or inequality based on the value of areEqual.

Note that this means that the contents of the element referenced by parentId
are whitespace-sensitive, and a stray space introduced during an edit to the
file could result in a correct but unexpected (in)equality failure.
Compares the first and third ( zero - indexed ) child nodes of the element ( typically to allow whitespace ) referenced by parentId for isEqualNode equality or inequality based on the value of areEqual . Note that this means that the contents of the element referenced by parentId are whitespace - sensitive and a stray space introduced during an edit to the file could result in a correct but unexpected ( in ) equality failure .
function equality_check_kids(parentId, areEqual)
{
  var parent = doc.getElementById(parentId);
  var kid1 = parent.childNodes.item(1);
  var kid2 = parent.childNodes.item(3);
  if (areEqual)
    check_eq_nodes(kid1, kid2);
  else
    check_neq_nodes(kid1, kid2);
}
function equality_check_kids ( parentId , areEqual ) { var parent = doc . getElementById ( parentId ) ; var kid1 = parent . childNodes . item ( 1 ) ; var kid2 = parent . childNodes . item ( 3 ) ; if ( areEqual ) check_eq_nodes ( kid1 , kid2 ) ; else check_neq_nodes ( kid1 , kid2 ) ; }
Compares the first and third (zero-indexed) child nodes of the element
 (typically to allow whitespace) referenced by parentId for isEqualNode
 equality or inequality based on the value of areEqual.
Compares the first and third ( zero - indexed ) child nodes of the element ( typically to allow whitespace ) referenced by parentId for isEqualNode equality or inequality based on the value of areEqual .