Showing whether zjrJS.Debug.log() actually works.
Used zjrJS Version:
Stable Minified version 20141202t2322 of zjrJS.
Preconditions
Successful When...
In the form, after pressing the Log button the below text is logged to the browser's console, if available.
Exception
If the browser's console is unavailable, the text is routed through zjrJS.Debug.alert(), for which reason we set zjrJS.Debug.mode to 1.
Text Sent
"Hello, World!"
Text logged
"--zjrJS Debug Log-- Hello, World!"
Text alerted
"--zjrJS Debug Alert--
Hello, World!"
- Javascript must be allowed to run on this page.
- zjrJS must at least be from November 27, 2011: zjrJS.20111127t1020.js
Successful When...
In the form, after pressing the Log button the below text is logged to the browser's console, if available.
Exception
If the browser's console is unavailable, the text is routed through zjrJS.Debug.alert(), for which reason we set zjrJS.Debug.mode to 1.
Text Sent
"Hello, World!"
Text logged
"--zjrJS Debug Log-- Hello, World!"
Text alerted
"--zjrJS Debug Alert--
Hello, World!"
Test Code:
var test=({
run: function () {"use strict";
if ( !test.require( "zjrJS.Debug.log",
"function" ) ) {
return false;
}
var s = "Hello, World!", m = 0, DEBUG_MODE_ON = 1;
m = new Number(zjrJS.Debug.mode);
zjrJS.Debug.mode = DEBUG_MODE_ON;
zjrJS.Debug.log(s);
zjrJS.Debug.mode = m;
return false;
}
});