Showing whether zjrJS.Doc.eid() actually works.
Used zjrJS Version:
Stable Minified version 20141202t2322 of zjrJS.
Preconditions
Javascript must be allowed to run on this page.
Successful When...
In the form, after each pressing on the Append Child button, an extra checkbox appears.
How does this test eid()?
The form contains 2 elements with an id attribute: the output fieldset is identified as receiver, and the template label/checkbox is identified as template. Eid() is used to get handles on both. If eid() were to fail, no extra checkboxes will appear in the output fieldset.
Javascript must be allowed to run on this page.
Successful When...
In the form, after each pressing on the Append Child button, an extra checkbox appears.
How does this test eid()?
The form contains 2 elements with an id attribute: the output fieldset is identified as receiver, and the template label/checkbox is identified as template. Eid() is used to get handles on both. If eid() were to fail, no extra checkboxes will appear in the output fieldset.
Test Code:
var test=({
run: function () {"use strict";
if (
!test.require( "zjrJS.Doc.aC", "function" )
|| !test.require( "zjrJS.Doc.eid", "function" )
) {
return false;
}
var D = zjrJS.Doc, extra;
extra = D.eid( "template" ).cloneNode( true );
D.aC( extra, D.eid( "receiver" ) );
D = extra = null;
return false;
}
});