Test Case for zjrJS.Doc.eid() - Beta Test Suite for zjrJS

This information lives on a webpage hosted at the following web address: 'https://www.omegajunior.net/code/zjrjs/beta.php'.

Showing whether zjrJS.Doc.eid() actually works.

Used zjrJS Version:

Stable Minified version 20141202t2322 of zjrJS.

There is no newer Beta version available.


 

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.
Actions
Template Checkbox
Extra Checkboxes

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;
	}
});
        

Download:

Download zjrJS’ latest stable build (20141202t2322) minified (7.1KB).

Download zjrJS’ latest stable build (20141202t2322) (11.9KB).