zjrJS Javascript Library

zjrJS.Debug.mode - zjrJS Javascript Library

This information lives on a webpage hosted at the following web address: 'https://omegajunior.globat.com/code/zjrjs/'.

How to use zjrJS.Debug.mode

Declaration
zjrJS.Debug.mode

Goal
Configure whether Debug.alert() does (set mode to any integer other than 0) or does not (set mode to 0) show an alert.

Typical usage
The developer can leave the Debug.alert() statements in their programming, and simply turn alerting on or off at the flick of a switch. Mind you, that setting Debug.mode does not change the behaviour of Debug.cack().

Member Type
Property.

Value Type
Number (typically 0 or 1).

Dependencies
None.

Example
<script type="text/javascript" src="zjrJS.version.js" id="zjrJS"></script>
<script type="text/javascript">/* <![CDATA[ */
var D=zjrJS.Doc;
D.aE(window,"load",function(){
//Switch on alerting
zjrJS.Debug.mode = 1;
zjrJS.Debug.alert("This message should be seen.");
//Switch off alerting
zjrJS.Debug.mode = 0;
zjrJS.Debug.alert("This message should stay hidden.");
});
D=null;
/* ]]> */</script>

Download:

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

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

Clicky Analytics